The Samba-Bugzilla – Attachment 12832 Details for
Bug 12522
[PATCH] Send last error messages to sender
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Send last error messages to sender
messages.patch (text/plain), 2.19 KB, created by
Ben RUBSON
on 2017-01-16 21:26:11 UTC
(
hide
)
Description:
Send last error messages to sender
Filename:
MIME Type:
Creator:
Ben RUBSON
Created:
2017-01-16 21:26:11 UTC
Size:
2.19 KB
patch
obsolete
>--- rsync.h.orig 2017-01-16 18:59:44.580812000 +0100 >+++ rsync.h 2017-01-16 18:59:51.814260000 +0100 >@@ -166,6 +166,7 @@ > #define ATTRS_REPORT (1<<0) > #define ATTRS_SKIP_MTIME (1<<1) > >+#define MSG_FLUSH 2 > #define FULL_FLUSH 1 > #define NORMAL_FLUSH 0 > >--- io.c.orig 2015-08-08 21:47:03.000000000 +0200 >+++ io.c 2017-01-16 19:01:07.000000000 +0100 >@@ -1985,10 +1985,11 @@ > void io_flush(int flush_it_all) > { > if (iobuf.out.len > iobuf.out_empty_len) { >- if (flush_it_all) /* FULL_FLUSH: flush everything in the output buffers */ >+ if (flush_it_all == FULL_FLUSH) /* flush everything in the output buffers */ > perform_io(iobuf.out.size - iobuf.out_empty_len, PIO_NEED_OUTROOM); >- else /* NORMAL_FLUSH: flush at least 1 byte */ >+ else if (flush_it_all == NORMAL_FLUSH) /* flush at least 1 byte */ > perform_io(iobuf.out.size - iobuf.out.len + 1, PIO_NEED_OUTROOM); >+ /* MSG_FLUSH: flush iobuf.msg only */ > } > if (iobuf.msg.len) > perform_io(iobuf.msg.size, PIO_NEED_MSGROOM); >--- cleanup.c.orig 2015-08-08 21:47:03.000000000 +0200 >+++ cleanup.c 2017-01-16 18:59:51.828553000 +0100 >@@ -26,6 +26,7 @@ > extern int am_server; > extern int am_daemon; > extern int am_receiver; >+extern int am_generator; > extern int io_error; > extern int keep_partial; > extern int got_xfer_error; >@@ -243,15 +244,19 @@ > switch_step++; > > if (exit_code && exit_code != RERR_SOCKETIO && exit_code != RERR_STREAMIO && exit_code != RERR_SIGNAL1 >- && exit_code != RERR_TIMEOUT && !shutting_down && (protocol_version >= 31 || am_receiver)) { >- if (line > 0) { >- if (DEBUG_GTE(EXIT, 3)) { >- rprintf(FINFO, "[%s] sending MSG_ERROR_EXIT with exit_code %d\n", >- who_am_i(), exit_code); >+ && exit_code != RERR_TIMEOUT && !shutting_down) { >+ if (am_generator) >+ io_flush(MSG_FLUSH); >+ if (protocol_version >= 31 || am_receiver) { >+ if (line > 0) { >+ if (DEBUG_GTE(EXIT, 3)) { >+ rprintf(FINFO, "[%s] sending MSG_ERROR_EXIT with exit_code %d\n", >+ who_am_i(), exit_code); >+ } >+ send_msg_int(MSG_ERROR_EXIT, exit_code); > } >- send_msg_int(MSG_ERROR_EXIT, exit_code); >+ noop_io_until_death(); > } >- noop_io_until_death(); > } > > /* FALLTHROUGH */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12522
:
12832
|
12838
|
12841
|
13959