summaryrefslogtreecommitdiff
path: root/pjlib/src
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src')
-rw-r--r--pjlib/src/pj/ioqueue_common_abs.c14
-rw-r--r--pjlib/src/pjlib-test/exception.c4
-rw-r--r--pjlib/src/pjlib-test/test.h12
3 files changed, 17 insertions, 13 deletions
diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c
index d5f8d657..35f86a06 100644
--- a/pjlib/src/pj/ioqueue_common_abs.c
+++ b/pjlib/src/pj/ioqueue_common_abs.c
@@ -168,20 +168,22 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h)
* level SOL_SOCKET to determine whether connect() completed
* successfully (if SO_ERROR is zero).
*/
- int value;
- socklen_t vallen = sizeof(value);
- int gs_rc = getsockopt(h->fd, SOL_SOCKET, SO_ERROR,
+ {
+ int value;
+ socklen_t vallen = sizeof(value);
+ int gs_rc = getsockopt(h->fd, SOL_SOCKET, SO_ERROR,
&value, &vallen);
- if (gs_rc != 0) {
+ if (gs_rc != 0) {
/* Argh!! What to do now???
* Just indicate that the socket is connected. The
* application will get error as soon as it tries to use
* the socket to send/receive.
*/
bytes_transfered = 0;
- } else {
+ } else {
bytes_transfered = value;
- }
+ }
+ }
#elif defined(PJ_WIN32) && PJ_WIN32!=0
bytes_transfered = 0; /* success */
#else
diff --git a/pjlib/src/pjlib-test/exception.c b/pjlib/src/pjlib-test/exception.c
index 44ed23ec..fcbe098c 100644
--- a/pjlib/src/pjlib-test/exception.c
+++ b/pjlib/src/pjlib-test/exception.c
@@ -140,8 +140,10 @@ int exception_test(void)
enum { LOOP = 10 };
for (i=0; i<LOOP; ++i) {
- if ((rc=test()) != 0)
+ if ((rc=test()) != 0) {
+ PJ_LOG(3,("", "...failed at i=%d (rc=%d)", i, rc));
return rc;
+ }
}
return 0;
}
diff --git a/pjlib/src/pjlib-test/test.h b/pjlib/src/pjlib-test/test.h
index 1af0a680..cf78f4f4 100644
--- a/pjlib/src/pjlib-test/test.h
+++ b/pjlib/src/pjlib-test/test.h
@@ -5,11 +5,11 @@
#include <pj/types.h>
-#define GROUP_LIBC 0
-#define GROUP_OS 0
-#define GROUP_DATA_STRUCTURE 0
-#define GROUP_NETWORK 0
-#define GROUP_FILE 0
+#define GROUP_LIBC 1
+#define GROUP_OS 1
+#define GROUP_DATA_STRUCTURE 1
+#define GROUP_NETWORK 1
+#define GROUP_FILE 1
#define GROUP_EXTRA 0
#define INCLUDE_ERRNO_TEST GROUP_LIBC
@@ -37,7 +37,7 @@
#define INCLUDE_XML_TEST GROUP_EXTRA
#define INCLUDE_ECHO_SERVER 0
-#define INCLUDE_ECHO_CLIENT 1
+#define INCLUDE_ECHO_CLIENT 0
#define ECHO_SERVER_MAX_THREADS 2