summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTony Garnock-Jones <tonyg@lshift.net>2009-05-07 13:25:51 +0100
committerTony Garnock-Jones <tonyg@lshift.net>2009-05-07 13:25:51 +0100
commita0a9c9d617b74e59be24531902f083e5b815a360 (patch)
treedcaa6c1885b161de92fe65e0f12db7e151585369 /examples
parentbb5b30716f9c307c47f2660e67cfebf1434a0da1 (diff)
downloadrabbitmq-c-a0a9c9d617b74e59be24531902f083e5b815a360.tar.gz
Report EOF specially
Diffstat (limited to 'examples')
-rw-r--r--examples/example_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/example_utils.c b/examples/example_utils.c
index de6694d..26b98db 100644
--- a/examples/example_utils.c
+++ b/examples/example_utils.c
@@ -26,7 +26,8 @@ void die_on_amqp_error(amqp_rpc_reply_t x, char const *context) {
break;
case AMQP_RESPONSE_LIBRARY_EXCEPTION:
- fprintf(stderr, "%s: %s\n", context, strerror(x.library_errno));
+ fprintf(stderr, "%s: %s\n", context,
+ x.library_errno ? strerror(x.library_errno) : "(end-of-stream)");
break;
case AMQP_RESPONSE_SERVER_EXCEPTION: