Bug 784519 - Part 2: Fix success callback event names r=jesup
☠☠ backed out by 13c45a7334fc ☠ ☠
authorAdam Roach [:abr] <adam@nostrum.com>
Tue, 07 May 2013 21:13:42 -0500
changeset 142153 6d5ff743bb6bfe3db8b0de28af080122256f6ac6
parent 142152 9b321cd729e5b4edb7f9fcbcb20b96edd8f8dbe1
child 142154 42e458069da3d884542e5d67eca1133852335683
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs784519
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 784519 - Part 2: Fix success callback event names r=jesup
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
media/webrtc/signaling/src/sipcc/core/gsm/fsmdef.c
media/webrtc/signaling/src/sipcc/core/includes/uiapi.h
media/webrtc/signaling/src/sipcc/include/cc_constants.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallInfo.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -130,17 +130,17 @@ public:
         mCallState(aInfo->getCallState()),
         mStateStr(aInfo->callStateToString(mCallState)) {
     if (mCallState == REMOTESTREAMADD) {
       MediaStreamTable *streams = NULL;
       streams = aInfo->getMediaStreams();
       mRemoteStream = mPC->media()->GetRemoteStream(streams->media_stream_id);
       MOZ_ASSERT(mRemoteStream);
     }
-    if ((mCallState == CREATEOFFER) || (mCallState == CREATEANSWER)) {
+    if ((mCallState == CREATEOFFERSUCCESS) || (mCallState == CREATEANSWERSUCCESS)) {
         mSdpStr = aInfo->getSDP();
     }
   }
 
   ~PeerConnectionObserverDispatch(){}
 
   NS_IMETHOD Run() {
 
@@ -160,43 +160,43 @@ public:
     }
 
     if (mReason.length()) {
       CSFLogInfo(logTag, "Message contains error: %d: %s",
                  mCode, mReason.c_str());
     }
 
     switch (mCallState) {
-      case CREATEOFFER:
+      case CREATEOFFERSUCCESS:
         mObserver->OnCreateOfferSuccess(mSdpStr.c_str());
         break;
 
-      case CREATEANSWER:
+      case CREATEANSWERSUCCESS:
         mObserver->OnCreateAnswerSuccess(mSdpStr.c_str());
         break;
 
       case CREATEOFFERERROR:
         mObserver->OnCreateOfferError(mCode, mReason.c_str());
         break;
 
       case CREATEANSWERERROR:
         mObserver->OnCreateAnswerError(mCode, mReason.c_str());
         break;
 
-      case SETLOCALDESC:
+      case SETLOCALDESCSUCCESS:
         // TODO: The SDP Parse error list should be copied out and sent up
         // to the Javascript layer before being cleared here. Even though
         // there was not a failure, it is possible that the SDP parse generated
         // warnings. The WebRTC spec does not currently have a mechanism for
         // providing non-fatal warnings.
         mPC->ClearSdpParseErrorMessages();
         mObserver->OnSetLocalDescriptionSuccess();
         break;
 
-      case SETREMOTEDESC:
+      case SETREMOTEDESCSUCCESS:
         // TODO: The SDP Parse error list should be copied out and sent up
         // to the Javascript layer before being cleared here. Even though
         // there was not a failure, it is possible that the SDP parse generated
         // warnings. The WebRTC spec does not currently have a mechanism for
         // providing non-fatal warnings.
         mPC->ClearSdpParseErrorMessages();
         mObserver->OnSetRemoteDescriptionSuccess();
         break;
@@ -1273,22 +1273,22 @@ PeerConnectionImpl::onCallEvent(ccapi_ca
 
   if (CCAPI_CALL_EV_CREATED != aCallEvent && CCAPI_CALL_EV_STATE != aCallEvent) {
     CSFLogDebug(logTag, "%s: **** CALL HANDLE IS: %s, **** CALL STATE IS: %s",
       __FUNCTION__, mHandle.c_str(), statestr.c_str());
     return;
   }
 
   switch (event) {
-    case SETLOCALDESC:
+    case SETLOCALDESCSUCCESS:
     case UPDATELOCALDESC:
       mLocalSDP = aInfo->getSDP();
       break;
 
-    case SETREMOTEDESC:
+    case SETREMOTEDESCSUCCESS:
     case ADDICECANDIDATE:
       mRemoteSDP = aInfo->getSDP();
       break;
 
     case CONNECTED:
       CSFLogDebug(logTag, "Setting PeerConnnection state to kActive");
       ChangeReadyState(kActive);
       break;
--- a/media/webrtc/signaling/src/sipcc/core/gsm/fsmdef.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/fsmdef.c
@@ -3151,17 +3151,17 @@ fsmdef_ev_createoffer (sm_event_t *event
         if (!local_sdp) {
             ui_create_offer(evCreateOfferError, line, call_id,
                 dcb->caller_id.call_instance_id, strlib_empty(),
                 PC_INTERNAL_ERROR, "Could not re-create local SDP for offer");
             FSM_DEBUG_SM("%s", get_debug_string(FSM_DBG_SDP_BUILD_ERR));
             return (fsmdef_release(fcb, cause, FALSE));
         }
 
-        ui_create_offer(evCreateOffer, line, call_id,
+        ui_create_offer(evCreateOfferSuccess, line, call_id,
             dcb->caller_id.call_instance_id,
             strlib_malloc(local_sdp,-1), PC_NO_ERROR, NULL);
         free(local_sdp);
         return (SM_RC_END);
     }
 
     dcb->inbound = FALSE;
 
@@ -3223,17 +3223,17 @@ fsmdef_ev_createoffer (sm_event_t *event
                 " cause = %s", cc_cause_name(cause));
         FSM_DEBUG_SM("%s", get_debug_string(FSM_DBG_SDP_BUILD_ERR));
         return (fsmdef_release(fcb, cause, FALSE));
     }
 
     dcb->local_sdp_complete = TRUE;
 
     /* Pass offer SDP back to UI */
-    ui_create_offer(evCreateOffer, line, call_id,
+    ui_create_offer(evCreateOfferSuccess, line, call_id,
         dcb->caller_id.call_instance_id,
         strlib_malloc(msg_body.parts[0].body, -1), PC_NO_ERROR, NULL);
     cc_free_msg_body_parts(&msg_body);
 
     return (SM_RC_END);
 }
 
 
@@ -3293,17 +3293,17 @@ fsmdef_ev_createanswer (sm_event_t *even
         if (!local_sdp) {
             ui_create_answer(evCreateAnswerError, line, call_id,
                 dcb->caller_id.call_instance_id, strlib_empty(),
                 PC_INTERNAL_ERROR, "Could not re-create local SDP for answer");
             FSM_DEBUG_SM("%s", get_debug_string(FSM_DBG_SDP_BUILD_ERR));
             return (fsmdef_release(fcb, cause, FALSE));
         }
 
-        ui_create_answer(evCreateAnswer, line, call_id,
+        ui_create_answer(evCreateAnswerSuccess, line, call_id,
             dcb->caller_id.call_instance_id,
             strlib_malloc(local_sdp,-1), PC_NO_ERROR, NULL);
         free(local_sdp);
         return (SM_RC_END);
     }
 
     dcb->inbound = TRUE;
 
@@ -3393,17 +3393,17 @@ fsmdef_ev_createanswer (sm_event_t *even
                 cc_cause_name(cause));
         FSM_DEBUG_SM("%s", get_debug_string(FSM_DBG_SDP_BUILD_ERR));
         return (fsmdef_release(fcb, cause, FALSE));
     }
 
     dcb->local_sdp_complete = TRUE;
 
     /* Pass SDP back to UI */
-    ui_create_answer(evCreateAnswer, line, call_id,
+    ui_create_answer(evCreateAnswerSuccess, line, call_id,
         dcb->caller_id.call_instance_id,
         strlib_malloc(msg_body.parts[0].body, -1), PC_NO_ERROR, NULL);
     cc_free_msg_body_parts(&msg_body);
 
     return (SM_RC_END);
 }
 
 
@@ -3550,17 +3550,17 @@ fsmdef_ev_setlocaldesc(sm_event_t *event
     if (!local_sdp) {
         ui_set_local_description(evSetLocalDescError, msg->line, msg->call_id,
             dcb->caller_id.call_instance_id, strlib_empty(),
             PC_INTERNAL_ERROR, "Could not encode local SDP for local "
             "description");
         return (SM_RC_END);
     }
 
-    ui_set_local_description(evSetLocalDesc, msg->line, msg->call_id,
+    ui_set_local_description(evSetLocalDescSuccess, msg->line, msg->call_id,
         dcb->caller_id.call_instance_id, strlib_malloc(local_sdp,-1),
         PC_NO_ERROR, NULL);
 
     free(local_sdp);
     return (SM_RC_END);
 }
 
 /**
@@ -3776,17 +3776,17 @@ fsmdef_ev_setremotedesc(sm_event_t *even
     if (!remote_sdp) {
         ui_set_remote_description(evSetRemoteDescError, line, call_id,
             dcb->caller_id.call_instance_id, strlib_empty(),
             PC_INTERNAL_ERROR, "Could not serialize remote description;"
             " cause = %s",  cc_cause_name(cause));
         return (SM_RC_END);
     }
 
-    ui_set_remote_description(evSetRemoteDesc, line, call_id,
+    ui_set_remote_description(evSetRemoteDescSuccess, line, call_id,
         dcb->caller_id.call_instance_id, strlib_malloc(remote_sdp,-1),
         PC_NO_ERROR, NULL);
 
     free(remote_sdp);
 
     return (SM_RC_END);
 }
 
--- a/media/webrtc/signaling/src/sipcc/core/includes/uiapi.h
+++ b/media/webrtc/signaling/src/sipcc/core/includes/uiapi.h
@@ -26,22 +26,22 @@ typedef enum {
     evBusy = BUSY,
     evReorder = REORDER,
     evConference = CONFERENCE,
     evRemInUse = REMINUSE,
     evCallPreservation = PRESERVATION,
     evHoldRevert = HOLDREVERT,
     evWhisper = WHISPER,
     evWaitingForDigits = WAITINGFORDIGITS,
-    evCreateOffer = CREATEOFFER,
-    evCreateAnswer = CREATEANSWER,
+    evCreateOfferSuccess = CREATEOFFERSUCCESS,
+    evCreateAnswerSuccess = CREATEANSWERSUCCESS,
     evCreateOfferError = CREATEOFFERERROR,
     evCreateAnswerError = CREATEANSWERERROR,
-    evSetLocalDesc = SETLOCALDESC,
-    evSetRemoteDesc = SETREMOTEDESC,
+    evSetLocalDescSuccess = SETLOCALDESCSUCCESS,
+    evSetRemoteDescSuccess = SETREMOTEDESCSUCCESS,
     evUpdateLocalDesc = UPDATELOCALDESC,
     evSetLocalDescError = SETLOCALDESCERROR,
     evSetRemoteDescError = SETREMOTEDESCERROR,
     evOnRemoteStreamAdd = REMOTESTREAMADD,
     evAddIceCandidate = ADDICECANDIDATE,
     evAddIceCandidateError = ADDICECANDIDATEERROR,
     evMaxEvent
 } call_events;
--- a/media/webrtc/signaling/src/sipcc/include/cc_constants.h
+++ b/media/webrtc/signaling/src/sipcc/include/cc_constants.h
@@ -271,22 +271,22 @@ typedef enum {
 	REORDER,
 	CONFERENCE,
 	DIALING,
 	REMINUSE,
 	HOLDREVERT,
 	WHISPER,
 	PRESERVATION,
 	WAITINGFORDIGITS = 21,
-	CREATEOFFER,
-	CREATEANSWER,
+	CREATEOFFERSUCCESS,
+	CREATEANSWERSUCCESS,
 	CREATEOFFERERROR,
 	CREATEANSWERERROR,
-	SETLOCALDESC,
-	SETREMOTEDESC,
+	SETLOCALDESCSUCCESS,
+	SETREMOTEDESCSUCCESS,
 	UPDATELOCALDESC,
 	UPDATEREMOTEDESC,
 	SETLOCALDESCERROR,
 	SETREMOTEDESCERROR,
 	REMOTESTREAMADD,
 	ADDICECANDIDATE,
 	ADDICECANDIDATEERROR,
     MAX_CALL_STATES
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallInfo.cpp
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallInfo.cpp
@@ -110,33 +110,33 @@ std::string CC_SIPCCCallInfo::callStateT
         statestr = "WHISPER";
         break;
       case PRESERVATION:
         statestr = "PRESERVATION";
         break;
       case WAITINGFORDIGITS:
         statestr = "WAITINGFORDIGITS";
         break;
-      case CREATEOFFER:
-        statestr = "CREATEOFFER";
+      case CREATEOFFERSUCCESS:
+        statestr = "CREATEOFFERSUCCESS";
         break;
-      case CREATEANSWER:
-        statestr = "CREATEANSWER";
+      case CREATEANSWERSUCCESS:
+        statestr = "CREATEANSWERSUCCESS";
         break;
       case CREATEOFFERERROR:
         statestr = "CREATEOFFERERROR";
         break;
       case CREATEANSWERERROR:
         statestr = "CREATEANSWERERROR";
         break;
-      case SETLOCALDESC:
-        statestr = "SETLOCALDESC";
+      case SETLOCALDESCSUCCESS:
+        statestr = "SETLOCALDESCSUCCESS";
         break;
-      case SETREMOTEDESC:
-        statestr = "SETREMOTEDESC";
+      case SETREMOTEDESCSUCCESS:
+        statestr = "SETREMOTEDESCSUCCESS";
         break;
       case UPDATELOCALDESC:
         statestr = "UPDATELOCALDESC";
         break;
       case SETLOCALDESCERROR:
         statestr = "SETLOCALDESCERROR";
         break;
       case SETREMOTEDESCERROR: