bernhard: utils/admin kolab_vacation_tool, 1.3, 1.4 kolab_vacation_tool.README, 1.3, 1.4
cvs at intevation.de
cvs at intevation.de
Thu Mar 16 13:26:25 CET 2006
Author: bernhard
Update of /kolabrepository/utils/admin
In directory doto:/tmp/cvs-serv18436
Modified Files:
kolab_vacation_tool kolab_vacation_tool.README
Log Message:
Added cleanup of connections.
Index: kolab_vacation_tool
===================================================================
RCS file: /kolabrepository/utils/admin/kolab_vacation_tool,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- kolab_vacation_tool 16 Mar 2006 11:14:07 -0000 1.3
+++ kolab_vacation_tool 16 Mar 2006 12:26:23 -0000 1.4
@@ -119,6 +119,8 @@
$addresses = $days = $text = false;
if( PEAR::isError( $scripts = $sieve->listScripts() ) ) {
$errors[] = $scripts->getMessage();
+ /* try to disconnect anyway (without recording further errors) */
+ $sieve->disconnect();
return $errors;
}
if( in_array( $scriptname, $scripts ) ) {
@@ -157,9 +159,12 @@
$errors[] = $res->getMessage();
$errors[] = 'Script was:';
$errors[] = $script;
+ /* try to disconnect anyway (without recording further errors) */
+ $sieve->disconnect();
return $errors;
}
+
if ($verbosity == 0) {
fwrite(STDOUT, "$user on $host: updated\n");
}
@@ -179,8 +184,18 @@
fwrite(STDOUT, "$user on $host: react to spam unchanged: ");
fwrite(STDOUT, ($new_dontreacttospam?"NO\n":"YES\n"));
}
+
}
+ if ($verbosity > 1) {
+ fwrite(STDOUT, "Trying to explicitely disconnect the Sieve connection.\n");
+ }
+
+ $result = $sieve->disconnect();
+ if( PEAR::isError( $result->_error ) ) {
+ $errors[] = $result->getMessage();
+ return $errors;
+ }
}
Index: kolab_vacation_tool.README
===================================================================
RCS file: /kolabrepository/utils/admin/kolab_vacation_tool.README,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- kolab_vacation_tool.README 16 Mar 2006 11:14:07 -0000 1.3
+++ kolab_vacation_tool.README 16 Mar 2006 12:26:23 -0000 1.4
@@ -27,10 +27,12 @@
News
----
-Since Revision 1.3 the script waits for half a second in case of an error
-before trying the next user.
-If timsieved does not start, the script before Rev 1.3 would try right away
-which might cause further strain on the cyrus system.
+Revision 1.4:
+ Try to close the connections to timsieved after a user is done.
+Revision 1.3:
+ Waiting half a second in case of an error, before trying the next user.
+ Trying right away might cause further strain on the system,
+ e.g. when timsieved has a general problem.
$Id$
More information about the commits
mailing list