Skip to content

Commit

Permalink
s/warnp/warn0/ for NETWORK_STATUS_CONNERR errors.
Browse files Browse the repository at this point in the history
Originally we could rely on errno being meaningful at this point, but with
the switch to using libcperciva's network_connect there's a possibility of
getting a delayed failure callback since network_connect sometimes queues
an immediate callback rather than making a direct call, in order to avoid
problems with unbounded recursion.

At some point in the future this might change back; libcperciva would need
to save and restore errno appropriately first.  (Junior hacker task!)
  • Loading branch information
cperciva committed Jun 27, 2015
1 parent 8da80f9 commit 4640c06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netproto/netproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ _netproto_printerr(int status)

switch (status) {
case NETWORK_STATUS_CONNERR:
/* Could not connect; error is specified in errno. */
warnp("Error connecting to server");
/* Could not connect. */
warn0("Error connecting to server");
break;
case NETWORK_STATUS_ERR:
/* Error is specified in errno. */
Expand Down

0 comments on commit 4640c06

Please sign in to comment.