Changeset 8620
- Timestamp:
- Oct 4, 2010, 2:27:16 PM (14 years ago)
- Location:
- source/ariba
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/communication/BaseCommunication.cpp
r8606 r8620 279 279 class DispatchMsg { 280 280 public: 281 DispatchMsg() : local(NULL), remote(NULL), message(NULL) {} 281 282 address_v* local; 282 283 address_v* remote; … … 385 386 if( !allowlink ){ 386 387 logging_warn( "Overlay denied creation of link" ); 388 delete msg; 387 389 return; 388 390 } … … 447 449 if (ld.isUnspecified()) { 448 450 logging_warn("Failed to find local link " << msg->getRemoteLink().toString()); 451 delete msg; 449 452 return; 450 453 } … … 458 461 ); 459 462 460 461 463 localDescriptor.getEndpoints().add( 462 464 msg->getRemoteDescriptor().getEndpoints(), … … 492 494 if (linkDesc.isUnspecified()) { 493 495 logging_warn("Failed to find local link " << localLink.toString()); 496 delete msg; 494 497 return; 495 498 } … … 521 524 logging_warn("Failed to update local link " 522 525 << localLink.toString()); 526 delete msg; 523 527 return; 524 528 } … … 543 547 } 544 548 } 549 545 550 delete msg; 546 551 } -
source/ariba/communication/networkinfo/AddressDiscovery.cpp
r8606 r8620 77 77 endpoint_set* set = (endpoint_set*)arg; 78 78 struct hci_dev_info di; 79 memset(&di, 0, sizeof(struct hci_dev_info)); 79 80 di.dev_id = dev_id; 80 81 if (ioctl(s, HCIGETDEVINFO, (void *) &di)) return 0; -
source/ariba/overlay/BaseOverlay.cpp
r7933 r8620 1436 1436 "Received join request for spovnet we don't handle " << 1437 1437 joinReq->getSpoVNetID().toString() ); 1438 delete joinReq; 1438 1439 return false; 1439 1440 } … … 1459 1460 bc->sendMessage( bcLink, &retmsg ); 1460 1461 1462 delete joinReq; 1461 1463 return true; 1462 1464 } … … 2158 2160 CommunicationListener* lst = getListener(service); 2159 2161 if(lst != NULL) lst->onKeyValue(dhtMsg->getKey(), dhtMsg->getValues() ); 2162 delete dhtMsg; 2160 2163 return true; 2161 2164 } -
source/ariba/overlay/modules/onehop/OneHop.cpp
r6919 r8620 328 328 } // for( ; i != iend; i++ ) 329 329 330 delete reply; 330 331 } // OneHopMessageTypeListingReply 331 332 … … 353 354 } // OneHopMessageTypeRoute 354 355 356 delete onemsg; 355 357 } 356 358 -
source/ariba/utility/messages/Message.cpp
r5870 r8620 88 88 Data data = data_serialize(&msg); 89 89 stream << ",data=" << data; 90 //data.release();90 data.release(); 91 91 stream << ")"; 92 92 return stream; -
source/ariba/utility/serialization/Data.hpp
r7523 r8620 396 396 size_t res_length = calcLength(new_length); 397 397 if (old_length != res_length) { 398 T* new_buffer = new T[res_length]; 399 if (bufferPtr != NULL) { 400 size_t clength = res_length < old_length ? res_length : old_length; 401 memcpy( new_buffer, bufferPtr, clength*sizeof(T) ); 402 delete [] bufferPtr; 398 399 if(res_length <= 0){ 400 if (bufferPtr != NULL) delete [] bufferPtr; 401 bufferPtr = NULL; 402 bufferLen = 0; 403 }else{ 404 T* new_buffer = new T[res_length]; 405 if (new_buffer != NULL) memset(new_buffer, 0, res_length*sizeof(T)); 406 if (bufferPtr != NULL) { 407 size_t clength = res_length < old_length ? res_length : old_length; 408 memcpy( new_buffer, bufferPtr, clength*sizeof(T) ); 409 delete [] bufferPtr; 410 } 411 bufferPtr = new_buffer; 412 bufferLen = new_length; 403 413 } 404 bufferPtr = new_buffer;405 bufferLen = new_length;406 414 } 407 415 }
Note:
See TracChangeset
for help on using the changeset viewer.