Changeset 364 in flair-src for trunk/lib/FlairCore/src
- Timestamp:
- Sep 3, 2020, 1:59:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/UdpSocket_impl.cpp
r363 r364 251 251 for(i=0;i<sock_in_size;i++) { 252 252 if(sock_in[i].sin_port==sock_in_tmp.sin_port) { 253 Printf("match found in former adress\n");254 *src_id=i;253 //Printf("match found in former adress\n"); 254 if(src_id!=NULL) *src_id=i; 255 255 break; 256 256 } 257 257 } 258 258 if(i==sock_in_size) { 259 Printf("no match found in former adress\n");259 //Printf("no match found in former adress\n"); 260 260 sock_in_size++; 261 261 sock_in=(sockaddr_in*)realloc(sock_in,sock_in_size*sizeof(sockaddr_in)); 262 262 sock_in[sock_in_size-1]=sock_in_tmp; 263 *src_id=sock_in_size-1;263 if(src_id!=NULL) *src_id=sock_in_size-1; 264 264 } 265 265 } … … 281 281 return -1; 282 282 } else if (src_len != NULL && src != NULL) { 283 if (index + 1 > (int)(*src_len) && 284 src != NULL) { //+1 pour inserer un 0) 283 if (index + 1 > (int)(*src_len) && src != NULL) { //+1 pour inserer un 0) 285 284 self->Warn("insufficent src size\n"); 286 285 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.