diff options
author | Yorhel <git@yorhel.nl> | 2013-04-13 18:24:09 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2013-04-13 18:24:09 +0200 |
commit | 84134a5df3da3fe8a4d3621df08e7026f1f3e19b (patch) | |
tree | ece29eda40e35392010e223e6d07445d3e3edd93 | |
parent | 599f8d3057ae4ed568d7eb6727c7101b5ce546e7 (diff) |
hub/connection: Fix disconnect code when hub errormessage is empty
-rw-r--r-- | src/hub/connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hub/connection.c b/src/hub/connection.c index c3bfcdf..74ba6b7 100644 --- a/src/hub/connection.c +++ b/src/hub/connection.c @@ -95,8 +95,8 @@ static void hub_conn_readcb(nets_t *n, nets_read_t event, char *buffer, size_t l * that instead of a generic network disconnect error. */ const char *emsg = hub_hub_errormessage(h); hub_conn_disconnect(h, HUBCD_RECONNECT, - emsg ? "net.blicky.Globster.Error.Hub" : "net.blicky.Globster.Error.ConnectionReset", - emsg ? emsg : strerror(ECONNRESET)); + *emsg ? "net.blicky.Globster.Error.Hub" : "net.blicky.Globster.Error.ConnectionReset", + *emsg ? emsg : strerror(ECONNRESET)); } else nets_read(h->c.n, h->c.buf + h->c.buflen, h->c.bufsize - h->c.buflen, hub_conn_readcb); } |