dovecot-2.2-pigeonhole: Sieve extprograms plugin: Fixed 'Bad fil...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Sat Dec 21 16:09:40 EET 2013
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/8612191c5069
changeset: 1823:8612191c5069
user: Stephan Bosch <stephan at rename-it.nl>
date: Sat Dec 21 15:09:32 2013 +0100
description:
Sieve extprograms plugin: Fixed 'Bad filedescriptor' error occurring when disconnecting script client.
diffstat:
src/plugins/sieve-extprograms/script-client.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diffs (42 lines):
diff -r 61772824b4ea -r 8612191c5069 src/plugins/sieve-extprograms/script-client.c
--- a/src/plugins/sieve-extprograms/script-client.c Fri Dec 13 21:35:58 2013 +0100
+++ b/src/plugins/sieve-extprograms/script-client.c Sat Dec 21 15:09:32 2013 +0100
@@ -48,7 +48,6 @@
if ( sclient->script_output != NULL )
o_stream_destroy(&sclient->script_output);
sclient->script_output = NULL;
- sclient->fd_out = -1;
return ret;
}
@@ -135,10 +134,8 @@
}
} while ( (ret=i_stream_read(input)) > 0 );
- if ( ret == 0 ) {
- // FIXME: not supposed to happen; returning 0 will poll the input stream
- return 0;
- }
+ if ( ret == 0 )
+ return 1;
if ( ret < 0 ) {
if ( !input->eof ) {
@@ -158,16 +155,12 @@
}
if ( input == NULL ) {
- o_stream_unref(&sclient->script_output);
-
if ( sclient->script_input == NULL ) {
script_client_disconnect(sclient, FALSE);
} else if (script_client_close_output(sclient) < 0) {
- return -1;
+ script_client_fail(sclient, SCRIPT_CLIENT_ERROR_IO);
}
- return 0;
}
-
return 1;
}
More information about the dovecot-cvs
mailing list