From 39b81bab19c83e2a9896ea2e3a0b19cb00f46903 Mon Sep 17 00:00:00 2001 From: trawick Date: Tue, 7 Aug 2001 14:16:49 +0000 Subject: 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 --- test/client.c | 5 +++-- 1 file 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"); -- cgit v1.2.1