Bug 1035130 - Part 1: Only accept one conference request at a time. r=hsinyi
authorSzu-Yu Chen [:aknow] <szchen@mozilla.com>
Wed, 09 Jul 2014 19:39:00 -0400
changeset 193323 81abb9a43f2ce0e43a8042d6cf5ca8221b093849
parent 193322 e619eb4859495461e9ffa3254416a306427d7014
child 193324 48a8caaf166a820ba9c95cde989cd7a60b44a000
push id8782
push userryanvm@gmail.com
push dateThu, 10 Jul 2014 14:54:49 +0000
treeherderb2g-inbound@80b00f38b6fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1035130
milestone33.0a1
Bug 1035130 - Part 1: Only accept one conference request at a time. r=hsinyi
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -1856,16 +1856,25 @@ RilObject.prototype = {
   // Flag indicating whether user has requested making a conference call.
   _hasConferenceRequest: false,
 
   conferenceCall: function(options) {
     if (this._isCdma) {
       options.featureStr = "";
       this.sendCdmaFlashCommand(options);
     } else {
+      // Only accept one conference request at a time..
+      if (this._hasConferenceRequest) {
+        options.success = false;
+        options.errorName = "addError";
+        options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
+        this.sendChromeMessage(options);
+        return;
+      }
+
       this._hasConferenceRequest = true;
       this.telephonyRequestQueue.push(REQUEST_CONFERENCE,
                                       this.sendRilRequestConference, options);
     }
   },
 
   sendRilRequestConference: function(options) {
     this.context.Buf.simpleRequest(REQUEST_CONFERENCE, options);