adding Already Set error.
[platform/framework/native/messaging.git] / src / FMsg_SmsMmsCallbackHandler.cpp
index d3711dc..6187983 100644 (file)
@@ -180,15 +180,15 @@ _SmsMmsCallbackHandler::AddCbsChannel(int from, int to, Tizen::Base::String& nam
                SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel.");
 
                pCbsChannel->GetRange(fromId, toId);
-               if (from == fromId && to == toId && pCbsChannel->GetName() == name)
+               if (from == fromId && to == toId)
                {
                        channelFound = true;
-                       _CbsChannelImpl::GetInstance(*pCbsChannel)->SetCbsChannelState(activate);
                        break;  // found channel to be updated.
                }
 
                
        }
+       SysTryReturn(NID_MSG, channelFound == false, r = E_ALREADY_SET, E_ALREADY_SET, "Failed due to already cb range.");      
 
 
        if (!channelFound)