X-Git-Url: http://git.alex.org.uk diff --git a/nbd-server.c b/nbd-server.c index 133bc7e..aea5d2f 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -1390,11 +1390,11 @@ CLIENT* negotiate(int net, CLIENT *client, GArray* servers, int phase) { } if (write(net, &magic, sizeof(magic)) < 0) { err_nonfatal("Negotiation failed: %m"); - if(client) + if(phase & NEG_OLD) exit(EXIT_FAILURE); } } - if(phase & NEG_MODERN) { + if ((phase & NEG_MODERN) && (phase & NEG_INIT)) { /* modern */ uint32_t reserved; uint32_t opt; @@ -2273,6 +2273,7 @@ void glib_message_syslog_redirect(const gchar *log_domain, break; case G_LOG_LEVEL_DEBUG: level=LOG_DEBUG; + break; default: level=LOG_ERR; }