Changeset 5388
- Timestamp:
- Jul 18, 2016 11:02:02 AM (8 years ago)
- Location:
- pjproject/trunk/pjnath/src/pjnath-test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath-test/concur_test.c
r5339 r5388 264 264 pj_assert(status == PJ_SUCCESS); 265 265 266 /* Set socket to nonblocking to avoid stuck in recv/recvfrom() on concurrent events */ 267 app_set_sock_nb(test_sess.server_sock); 268 266 269 addr_len = sizeof(bind_addr); 267 270 status = pj_sock_getsockname(test_sess.server_sock, &bind_addr, &addr_len); -
pjproject/trunk/pjnath/src/pjnath-test/test.c
r4728 r5388 20 20 #include "test.h" 21 21 #include <pjlib.h> 22 #include <pj/compat/socket.h> 22 23 23 24 void app_perror(const char *msg, pj_status_t rc) … … 29 30 pj_strerror(rc, errbuf, sizeof(errbuf)); 30 31 PJ_LOG(1,("test", "%s: [pj_status_t=%d] %s", msg, rc, errbuf)); 32 } 33 34 /* Set socket to nonblocking. */ 35 void app_set_sock_nb(pj_sock_t sock) 36 { 37 #if defined(PJ_WIN32) && PJ_WIN32!=0 || \ 38 defined(PJ_WIN64) && PJ_WIN64 != 0 || \ 39 defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 40 u_long value = 1; 41 ioctlsocket(sock, FIONBIO, &value); 42 #else 43 pj_uint32_t value = 1; 44 ioctl(sock, FIONBIO, &value); 45 #endif 31 46 } 32 47 -
pjproject/trunk/pjnath/src/pjnath-test/test.h
r5350 r5388 45 45 46 46 extern void app_perror(const char *title, pj_status_t rc); 47 extern void app_set_sock_nb(pj_sock_t sock); 47 48 extern pj_pool_factory *mem; 48 49
Note: See TracChangeset
for help on using the changeset viewer.