extern int am_root;
extern int am_server;
extern int am_sender;
+extern int am_receiver;
extern int am_generator;
extern int am_starting_up;
extern int allow_8bit_chars;
* can wrap around to the start, and the xbuf may have its ".size" reduced
* (presumably by 1 byte) if the iconv code doesn't have space to store a
* multi-byte character at the physical end of the ".buf" (though no reducing
- * happens if ".pos" is < 1, since there is no room to wrap around).
+ * happens if ".pos" is <= 1, since there is no room to wrap around).
*
* If ICB_EXPAND_OUT is set in "flags", the "out" xbuf will be allocated if
* empty, and (as long as ICB_CIRCULAR_OUT is not set) expanded if too small.
iflags = protocol_version >= 29 ? read_shortint(f_in)
: ITEM_TRANSFER | ITEM_MISSING_DATA;
- /* Honor the old-style keep-alive indicator. */
- if (protocol_version < 30
- && ndx == cur_flist->used && iflags == ITEM_IS_NEW) {
+ /* Support the protocol-29 keep-alive style. */
+ if (protocol_version < 30 && ndx == cur_flist->used && iflags == ITEM_IS_NEW) {
if (am_sender)
- maybe_send_keepalive();
+ maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
goto read_loop;
}
{
if (am_starting_up)
return am_server ? "server" : "client";
- return am_sender ? "sender" : am_generator ? "generator" : "receiver";
+ return am_sender ? "sender"
+ : am_generator ? "generator"
+ : am_receiver ? "receiver"
+ : "Receiver"; /* pre-forked receiver */
}