Changeset 364 in flair-src for trunk/lib/FlairCore/src


Ignore:
Timestamp:
Sep 3, 2020, 1:59:51 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

modifs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/UdpSocket_impl.cpp

    r363 r364  
    251251    for(i=0;i<sock_in_size;i++) {
    252252        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;
    255255            break;
    256256        }
    257257    }
    258258    if(i==sock_in_size) {
    259         Printf("no match found in former adress\n");
     259        //Printf("no match found in former adress\n");
    260260        sock_in_size++;
    261261        sock_in=(sockaddr_in*)realloc(sock_in,sock_in_size*sizeof(sockaddr_in));
    262262        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;
    264264    }
    265265  }
     
    281281        return -1;
    282282      } 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)
    285284          self->Warn("insufficent src size\n");
    286285          return -1;
Note: See TracChangeset for help on using the changeset viewer.