trawick 01/08/07 07:16:50
Modified: test client.c
Log:
add some simple diagnostics for apr_send() failures
Revision Changes Path
1.33 +3 -2 apr/test/client.c
Index: client.c
===================================================================
RCS file: /home/cvs/apr/test/client.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- client.c 2001/07/18 16:51:49 1.32
+++ client.c 2001/08/07 14:16:49 1.33
@@ -148,9 +148,10 @@
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");