diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2001-08-07 14:16:49 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2001-08-07 14:16:49 +0000 |
commit | 39b81bab19c83e2a9896ea2e3a0b19cb00f46903 (patch) | |
tree | f8f63783691536983478ee50579a0894eb1e9886 /test | |
parent | 9045af4eedac8be569520abce68d8557d6b36be5 (diff) | |
download | libapr-39b81bab19c83e2a9896ea2e3a0b19cb00f46903.tar.gz |
add some simple diagnostics for apr_send() failures
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62117 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/client.c b/test/client.c index a7a5eb190..5ae273782 100644 --- a/test/client.c +++ b/test/client.c @@ -148,9 +148,10 @@ int main(int argc, char *argv[]) fprintf(stdout, "\tClient: Trying to send data over socket......."); length = STRLEN; - if (apr_send(sock, datasend, &length) != APR_SUCCESS) { + if ((stat = apr_send(sock, datasend, &length) != APR_SUCCESS)) { apr_socket_close(sock); - fprintf(stderr, "Problem sending data\n"); + fprintf(stderr, "Problem sending data: %s (%d)\n", + apr_strerror(stat, msgbuf, sizeof(msgbuf)), stat); exit(-1); } fprintf(stdout, "OK\n"); |