Skip to content

Commit

Permalink
damn!
Browse files Browse the repository at this point in the history
the last pre-release had a bug that didn't setup the multiplexing
correctly. This means that pre-release will get "unexpected tag -7"
whenm talking to the fixed code.
  • Loading branch information
Andrew Tridgell committed Jan 29, 2000
1 parent 31b7d79 commit 6d7b608
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
8 changes: 5 additions & 3 deletions io.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ static void mplex_write(int fd, enum logcode code, char *buf, int len)

SIVAL(buffer, 0, ((MPLEX_BASE + (int)code)<<24) + len);

if (n > (sizeof(buf)-4)) {
n = sizeof(buf)-4;
if (n > (sizeof(buffer)-4)) {
n = sizeof(buffer)-4;
}

memcpy(&buffer[4], buf, n);
Expand All @@ -417,7 +417,9 @@ static void mplex_write(int fd, enum logcode code, char *buf, int len)
len -= n;
buf += n;

writefd_unbuffered(fd, buf, len);
if (len) {
writefd_unbuffered(fd, buf, len);
}
}


Expand Down
14 changes: 9 additions & 5 deletions log.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void rwrite(enum logcode code, char *buf, int len)
extern int quiet;
/* recursion can happen with certain fatal conditions */

if (quiet != 0 && code == FINFO) return;
if (quiet && code == FINFO) return;

if (len < 0) exit_cleanup(RERR_MESSAGEIO);

Expand All @@ -105,7 +105,13 @@ void rwrite(enum logcode code, char *buf, int len)
return;
}

if (io_error_write(log_error_fd, code, buf, strlen(buf))) return;
if (io_error_write(log_error_fd, code, buf, strlen(buf))) {
return;
}

if (io_multiplex_write(code, buf, strlen(buf))) {
return;
}

if (am_daemon) {
static int depth;
Expand All @@ -117,9 +123,7 @@ void rwrite(enum logcode code, char *buf, int len)
depth++;

log_open();
if (!io_multiplex_write(code, buf, strlen(buf))) {
logit(priority, buf);
}
logit(priority, buf);

depth--;
return;
Expand Down
8 changes: 4 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,11 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
extern int am_sender;
extern int remote_version;

setup_protocol(f_out, f_in);

if (remote_version >= 23)
io_start_multiplex_out(f_out);

setup_protocol(f_out, f_in);

if (am_sender) {
recv_exclude_list(f_in);
if (cvs_exclude)
Expand All @@ -418,10 +418,10 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
extern int list_only;
extern int remote_version;

setup_protocol(f_out,f_in);

if (remote_version >= 23)
io_start_multiplex_in(f_in);

setup_protocol(f_out,f_in);

if (am_sender) {
extern int cvs_exclude;
Expand Down

0 comments on commit 6d7b608

Please sign in to comment.