Changeset 364 in flair-src for trunk


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

modifs

Location:
trunk
Files:
2 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;
  • trunk/tools/VrpnLite/src/VrpnLite.cpp

    r363 r364  
    7777
    7878void VrpnLite::SendObjects(void) const{
    79  return;
    80  int16_t position[3];
     79 
     80  int16_t position[3];
    8181  int16_t quaternion[4];
    8282  Time time;
    83   char datas[vrpnobjects.size()*(sizeof(position)+sizeof(quaternion))+ sizeof(time)];
    84   char *datasPtr=datas;
    8583 
    8684  //for (vector<vector<VrpnObject*>>::const_iterator connection= vrpnobjects_list.begin();connection < vrpnobjects_list.end(); connection++) {
    8785  for (int i=0;i<vrpnobjects_list.size();i++) {
     86      char datas[vrpnobjects_list.at(i).size()*(sizeof(position)+sizeof(quaternion))+ sizeof(time)];
     87      char *datasPtr=datas;
    8888      for (vector<VrpnObject*>::const_iterator it = vrpnobjects_list.at(i).begin();it < vrpnobjects_list.at(i).end(); it++) {
    8989        Vector3Df objectPosition;
Note: See TracChangeset for help on using the changeset viewer.