Bug 961007 - Data mobile usage is not counted. r=chucklee, a=1.3+
authorAlbert Crespell <acperez@tid.es>
Sun, 19 Jan 2014 10:03:24 +0100
changeset 175926 bb2a6925b7124997394ff2f64483995b4e12e9be
parent 175925 5fb1fa58180a0dc486fcb54b20d526659539b1a0
child 175927 93fdb91a7e145ea706000244a436db0fff9dd115
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschucklee, 1.3
bugs961007
milestone28.0a2
Bug 961007 - Data mobile usage is not counted. r=chucklee, a=1.3+
dom/system/gonk/NetworkService.js
--- a/dom/system/gonk/NetworkService.js
+++ b/dom/system/gonk/NetworkService.js
@@ -121,17 +121,17 @@ NetworkService.prototype = {
         success: true,  // netd always return success even interface doesn't exist.
         rxBytes: 0,
         txBytes: 0
       };
       result.date = new Date();
 
       if (Components.isSuccessCode(status)) {
         // Find record for corresponding interface.
-        let statExpr = / +(\S+): +(\d+) +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +(\d+) +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +\d+/;
+        let statExpr = /(\S+): +(\d+) +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +(\d+) +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +\d+/;
         let data = NetUtil.readInputStreamToString(inputStream,
                     inputStream.available()).split("\n");
         for (let i = 2; i < data.length; i++) {
           let parseResult = statExpr.exec(data[i]);
           if (parseResult && parseResult[1] === networkName) {
             result.rxBytes = parseInt(parseResult[2], 10);
             result.txBytes = parseInt(parseResult[3], 10);
             break;