Changeset 5698 for source/ariba
- Timestamp:
- Aug 5, 2009, 11:05:33 AM (15 years ago)
- Location:
- source/ariba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/BaseOverlay.cpp
r5687 r5698 944 944 logging_debug( "Handling message: " << message->toString()); 945 945 946 bool ret = false; 947 946 948 // decapsulate overlay message 947 949 OverlayMsg* overlayMsg = … … 973 975 "Received join request for spovnet we don't handle " << 974 976 joinReq->getSpoVNetID().toString() ); 975 return false; 977 ret = false; 978 break; 976 979 } 977 980 … … 994 997 retmsg.encapsulate(&replyMsg); 995 998 bc->sendMessage( bcLink, &retmsg ); 996 return true; 999 ret = true; 1000 break; 997 1001 } 998 1002 … … 1011 1015 replyMsg->getSpoVNetID().toString() << 1012 1016 " != " << spovnetId.toString() ); 1013 return false; 1017 ret = false; 1018 delete replyMsg; 1019 break; 1014 1020 } 1015 1021 … … 1033 1039 i->onJoinFailed( spovnetId ); 1034 1040 1035 return true; 1041 ret = true; 1042 delete replyMsg; 1043 break; 1036 1044 } 1037 1045 … … 1072 1080 i->onJoinFailed( spovnetId ); 1073 1081 1074 return true; 1082 delete replyMsg; 1083 ret = true; 1084 break; 1075 1085 } 1076 1086 … … 1088 1098 i->onJoinCompleted( spovnetId ); 1089 1099 1100 delete replyMsg; 1101 1090 1102 } else { 1091 1103 … … 1094 1106 overlayInterface->joinOverlay( replyMsg->getBootstrapEndpoint() ); 1095 1107 1108 delete replyMsg; 1109 1096 1110 } // if( overlayInterface == NULL ) 1097 1111 1098 return true; 1112 ret = true; 1113 break; 1099 1114 } 1100 1115 … … 1111 1126 CommunicationListener* listener = 1112 1127 communicationListeners.get( service ); 1113 if( listener == NULL ) return true; 1128 if( listener == NULL ) { 1129 ret = true; 1130 break; 1131 } 1114 1132 1115 1133 // delegate data message … … 1117 1135 overlayMsg->getSourceNode(), ld->overlayId ); 1118 1136 1119 return true; 1137 ret = true; 1138 break; 1120 1139 } 1121 1140 … … 1134 1153 logging_warn( "received overlay update message for link " << 1135 1154 ld->overlayId.toString() << " for which we have no mapping" ); 1136 return false; 1155 ret = false; 1156 break; 1137 1157 } 1138 1158 … … 1154 1174 if( !communicationListeners.contains( service ) ) { 1155 1175 logging_warn( "Link up: event listener has not been registered" ); 1156 return false; 1176 ret = false; 1177 break; 1157 1178 } 1158 1179 … … 1161 1182 if( listener == NULL || listener == &CommunicationListener::DEFAULT ) { 1162 1183 logging_warn("Link up: event listener is default or null!" ); 1163 return true; 1184 ret = true; 1185 break; 1164 1186 } 1165 1187 … … 1180 1202 // drop the link 1181 1203 dropLink( ld->overlayId ); 1182 return true; 1204 ret = true; 1205 break; 1183 1206 } 1184 1207 … … 1206 1229 sideport->onLinkUp( ld->overlayId, nodeId, sourcenode, this->spovnetId ); 1207 1230 1208 return true; 1231 ret = true; 1232 break; 1209 1233 } 1210 1234 … … 1227 1251 if ( i == pendingLinks.end() ) { 1228 1252 logging_error( "Nonce not found in link request" ); 1229 return true; 1253 ret = true; 1254 break; 1230 1255 } 1231 1256 … … 1241 1266 // get descriptor 1242 1267 LinkDescriptor* ldn = getDescriptor(i->second); 1243 if (ldn==NULL) return true; 1268 if (ldn==NULL) { 1269 delete linkReq; 1270 ret = true; 1271 break; 1272 } 1244 1273 1245 1274 // check if link request reply has a relay node ... … … 1330 1359 } 1331 1360 delete linkReq; 1332 return true; 1361 ret = true; 1362 break; 1333 1363 } 1334 1364 … … 1360 1390 logging_debug("Relay message reached destination. Handling the message."); 1361 1391 handleMessage( relayMsg, relayMsg->getDestLink(), LinkID::UNSPECIFIED, remoteNode ); 1362 return true; 1392 ret = true; 1393 break; 1363 1394 } 1364 1395 … … 1377 1408 sendOverlay( &_overMsg, relayMsg->getRelayNode() ); 1378 1409 } 1379 return true; 1410 ret = true; 1411 break; 1380 1412 } 1381 1413 … … 1394 1426 logging_debug("Relay message reached destination. Handling the message."); 1395 1427 handleMessage( relayMsg, relayMsg->getDestLink(), LinkID::UNSPECIFIED, remoteNode ); 1396 return true; 1428 ret = true; 1429 break; 1397 1430 } 1398 1431 … … 1406 1439 /// this must be handled by using relay link! 1407 1440 sendOverlay(&_overMsg, relayMsg->getDestNode()); 1408 return true; 1441 ret = true; 1442 break; 1409 1443 } 1410 1444 1411 1445 // error: I'm not a relay or destination! 1412 1446 logging_error("This node is neither relay nor destination. Dropping Message!"); 1413 return true; 1447 ret = true; 1448 break; 1414 1449 } 1415 1450 default: { 1416 1451 logging_error("RelayMessage Unknown!"); 1417 return true; 1452 ret = true; 1453 break; 1418 1454 } 1419 1455 } … … 1476 1512 "what to do with this message of type " << 1477 1513 overlayMsg->getType() ); 1478 return false; 1514 ret = false; 1515 break; 1479 1516 } 1480 1517 } /* switch */ 1481 1518 1482 return false; 1519 delete overlayMsg; 1520 return ret; 1483 1521 } 1484 1522 -
source/ariba/overlay/modules/chord/Chord.cpp
r5682 r5698 314 314 logging_debug("Route chord message to " 315 315 << item->id.toString() << " (destination=" << m->getDestination() << ")"); 316 send(m, item->info); 316 ChordMessage cmsg(*m); 317 send(&cmsg, item->info); 317 318 } 318 319 break; -
source/ariba/utility/transport/tcpip/tcpip.cpp
r5690 r5698 190 190 tcpip_endpoint remote = convert(remote_peer); 191 191 tcpip_endpoint local = convert(local_peer); 192 193 // DO NOT SET REMOTE PORT!194 // remote.port() = remote_port;195 // cout << "received: remote="196 // << remote.to_string()197 // << " local="198 // << local.to_string() << " size=" << message_size << endl;199 192 tp.listener->receive_message( 200 193 &tp, local, remote, datamsg->get_buffer()+6, message_size ); 201 194 202 delete datamsg;203 }195 } 196 delete tpmsg; 204 197 } 205 198 // clean queue & stop
Note:
See TracChangeset
for help on using the changeset viewer.