diff --git a/src/ifmap/client/ifmap_channel.cc b/src/ifmap/client/ifmap_channel.cc index 7d72a5afa85..1c54e360f52 100644 --- a/src/ifmap/client/ifmap_channel.cc +++ b/src/ifmap/client/ifmap_channel.cc @@ -376,7 +376,7 @@ int IFMapChannel::ExtractPubSessionId() { if ((reply_str.find("errorResult") != string::npos) || (reply_str.find("endSessionResult") != string::npos)) { - IFMAP_PEER_WARN(IFMapServerConnection, + IFMAP_PEER_WARN(IFMapServerConnection, "Error received instead of PubSessionId. Quitting.", ""); return -1; } @@ -515,7 +515,10 @@ int IFMapChannel::ReadSubscribeResponseStr() { } else if (reply_str.find(string("subscribeReceived")) != string::npos) { return 0; } else { - assert(0); + IFMAP_PEER_WARN(IFMapServerConnection, + "Unexpected message received instead of SubscribeReceived. " + "Quitting.", ""); + return -1; } return 0; } @@ -582,12 +585,16 @@ int IFMapChannel::ReadPollResponse() { // all possible responses, 3.7.5 if ((reply_str.find("errorResult") != string::npos) || (reply_str.find("endSessionResult") != string::npos)) { - IFMAP_PEER_WARN(IFMapServerConnection, + IFMAP_PEER_WARN(IFMapServerConnection, "Error received instead of PollResult. Quitting.", ""); return -1; } else if (reply_str.find(string("pollResult")) != string::npos) { size_t pos = reply_str.find(string("