- Timestamp:
- Sep 3, 2020, 1:59:51 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 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; -
trunk/tools/VrpnLite/src/VrpnLite.cpp
r363 r364 77 77 78 78 void VrpnLite::SendObjects(void) const{ 79 return;80 int16_t position[3];79 80 int16_t position[3]; 81 81 int16_t quaternion[4]; 82 82 Time time; 83 char datas[vrpnobjects.size()*(sizeof(position)+sizeof(quaternion))+ sizeof(time)];84 char *datasPtr=datas;85 83 86 84 //for (vector<vector<VrpnObject*>>::const_iterator connection= vrpnobjects_list.begin();connection < vrpnobjects_list.end(); connection++) { 87 85 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; 88 88 for (vector<VrpnObject*>::const_iterator it = vrpnobjects_list.at(i).begin();it < vrpnobjects_list.at(i).end(); it++) { 89 89 Vector3Df objectPosition;
Note:
See TracChangeset
for help on using the changeset viewer.