incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/6] bada commit: fixing network problem
Date Thu, 12 Apr 2012 23:45:54 GMT
Updated Branches:
  refs/heads/master 3ee9a5ac0 -> 1be7f088f


fixing network problem


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/commit/1be7f088
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/tree/1be7f088
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/diff/1be7f088

Branch: refs/heads/master
Commit: 1be7f088f0646ac76f11cad179f74057875c1c5d
Parents: 65adb62
Author: Anis Kadri <anis.kadri@gmail.com>
Authored: Thu Apr 12 16:45:45 2012 -0700
Committer: Anis Kadri <anis.kadri@gmail.com>
Committed: Thu Apr 12 16:45:45 2012 -0700

----------------------------------------------------------------------
 Res/main.js     |    1 +
 src/Network.cpp |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/1be7f088/Res/main.js
----------------------------------------------------------------------
diff --git a/Res/main.js b/Res/main.js
index 2d13db5..5e2d452 100755
--- a/Res/main.js
+++ b/Res/main.js
@@ -124,6 +124,7 @@ function hostIsReachable() {
   try {
     var network = document.getElementById('network');
     var callback = function(reachability) {
+      console.log(reachability);
       var networkState = reachability.code;
       var http_code = reachability.http_code;
       var states = [];

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/1be7f088/src/Network.cpp
----------------------------------------------------------------------
diff --git a/src/Network.cpp b/src/Network.cpp
index 437acf0..999cb84 100755
--- a/src/Network.cpp
+++ b/src/Network.cpp
@@ -117,7 +117,7 @@ Network::OnTransactionCompleted (HttpSession &httpSession, HttpTransaction
&http
 	AppLogDebug("%S", res.GetPointer());
 	pWeb->EvaluateJavascriptN(res);
 
-	res.Format(128, L"Cordova.callbacks['%S'].success(%d);", callbackId.GetPointer(), status);
+	res.Format(128, L"Cordova.callbacks['%S'].success({code:%d,http_code:%d});", callbackId.GetPointer(),
status, statusCode);
 	AppLogDebug("%S", res.GetPointer());
 	pWeb->EvaluateJavascriptN(res);
 }


Mime
View raw message