Changeset 2 for pjproject/main/pjlib/src/pjlib-test/echo_clt.c
- Timestamp:
- Nov 1, 2005 4:42:51 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/src/pjlib-test/echo_clt.c
r1 r2 47 47 PJ_FD_SET(sock, &fdset); 48 48 49 return pj_sock_select( 1, &fdset, NULL, NULL, &timeout);49 return pj_sock_select(FD_SETSIZE, &fdset, NULL, NULL, &timeout); 50 50 } 51 51 … … 83 83 return -20; 84 84 } 85 86 PJ_LOG(3,("", "...socket connected to %s:%d", 87 pj_inet_ntoa(addr.sin_addr), 88 pj_ntohs(addr.sin_port))); 85 89 86 90 pj_create_random_string(send_buf, BUF_SIZE); … … 116 120 if (rc == 0) { 117 121 PJ_LOG(3,("", "...timeout")); 122 bytes = 0; 123 } else if (rc < 0) { 124 rc = pj_get_netos_error(); 125 app_perror("...select() error", rc); 126 break; 118 127 } else { 119 128 /* Receive back the original packet. */ … … 130 139 } 131 140 bytes = 0; 141 received = 0; 132 142 break; 133 143 } 134 144 bytes += received; 135 } while (bytes != BUF_SIZE );145 } while (bytes != BUF_SIZE && bytes != 0); 136 146 } 137 147 … … 178 188 179 189 if (pj_memcmp(send_buf, recv_buf, BUF_SIZE) != 0) { 180 PJ_LOG(3,("", "...error: buffer has changed!"));190 //PJ_LOG(3,("", "...error: buffer has changed!")); 181 191 break; 182 192 }
Note: See TracChangeset
for help on using the changeset viewer.