trawick 01/04/19 14:21:38
Modified: test testsockopt.c
Log:
ignore failure to set APR_SO_DEBUG; some platforms don't have it
Revision Changes Path
1.5 +15 -15 apr/test/testsockopt.c
Index: testsockopt.c
===================================================================
RCS file: /home/cvs/apr/test/testsockopt.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- testsockopt.c 2001/02/16 04:16:10 1.4
+++ testsockopt.c 2001/04/19 21:21:37 1.5
@@ -138,24 +138,24 @@
printf("\tTrying to set APR_SO_DEBUG...............");
if (apr_setsocketopt(sock, APR_SO_DEBUG, 1) != APR_SUCCESS){
- apr_socket_close(sock);
- printf("Failed\n");
- exit (-1);
+ printf("Failed (ignored)\n");
}
- printf ("OK\n");
+ else {
+ printf ("OK\n");
- printf("\tChecking if we recorded it...............");
- if (apr_getsocketopt(sock, APR_SO_DEBUG, &ck) != APR_SUCCESS){
- apr_socket_close(sock);
- printf("Failed!\n");
- exit (-1);
+ printf("\tChecking if we recorded it...............");
+ if (apr_getsocketopt(sock, APR_SO_DEBUG, &ck) != APR_SUCCESS){
+ apr_socket_close(sock);
+ printf("Failed!\n");
+ exit (-1);
+ }
+ if (ck != 1){
+ printf ("No (%d)\n", ck);
+ apr_socket_close(sock);
+ exit (-1);
+ }
+ printf ("Yes\n");
}
- if (ck != 1){
- printf ("No (%d)\n", ck);
- apr_socket_close(sock);
- exit (-1);
- }
- printf ("Yes\n");
printf ("\tTrying to remove APR_SO_KEEPALIVE........");
if (apr_setsocketopt(sock, APR_SO_KEEPALIVE, 0) != APR_SUCCESS){