Bug 1035130 - Part 1: Only accept one conference request at a time. r=hsinyi, a=1.4+
authorSzu-Yu Chen [:aknow] <szchen@mozilla.com>
Wed, 09 Jul 2014 19:39:00 -0400
changeset 207930 1f50cc1bb505f84a34cd9a7fc7d42cebd552d58b
parent 207929 00c4fd216e93971c532c9f024735cfcd6bb79bae
child 207931 69340019902d2a9369a40b0ecf615e8a8b9cbf91
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi, 1
bugs1035130
milestone32.0a2
Bug 1035130 - Part 1: Only accept one conference request at a time. r=hsinyi, a=1.4+
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -1848,16 +1848,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);