diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libbugzilla.js | 6 | ||||
-rw-r--r-- | lib/main.js | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js index 2ec69a6..d30a025 100644 --- a/lib/libbugzilla.js +++ b/lib/libbugzilla.js @@ -87,7 +87,7 @@ function getPassword(login, domain) { // pass === null means no appropriatjslie password in the storage if (!preferences.get(prefName,false) && (pass === null)) { - passwordText = prompts.promptPassword(passPrompt); + var passwordText = prompts.promptPassword(passPrompt); if (passwordText && passwordText.length > 0) { passUtils.setLogin(login, passwordText, domain, BTSPassRealm); @@ -262,6 +262,8 @@ exports.makeXMLRPCCall = function makeXMLRPCCall(url, login, method, params, cal if (!passwObj.password) { return null; // TODO this should happen, only when user presses Escape in password prompt } + console.log("makeXMLRPCCall :\n\turl = " + url + "\n\tlogin = " + login + "\n\tmethod = " + + method + "\n\tparams = " + params.toSource() + "\n\tcallback = " + callback.toSource()); var msg = new xrpc.XMLRPCMessage(method); params.forEach(function (par) { @@ -275,7 +277,7 @@ exports.makeXMLRPCCall = function makeXMLRPCCall(url, login, method, params, cal onComplete: function(response) { if (response.status == 200) { var resp = parseXMLfromString(response.text); - callback(resp); + callback(resp.toXMLString()); } }, content: msg.xml(), diff --git a/lib/main.js b/lib/main.js index cd8f259..a169fae 100644 --- a/lib/main.js +++ b/lib/main.js @@ -78,7 +78,7 @@ var messageHandler = exports.messageHandler = function messageHandler(worker, ms libbz.changeJSONURL(); break; case "OpenURLinPanel": - libbz.openURLinPanel(msg.data); + libbz.openURLInNewPanel(msg.data); break; case "OpenURLinTab": libbz.openURLInNewTab(msg.data); @@ -90,10 +90,7 @@ var messageHandler = exports.messageHandler = function messageHandler(worker, ms // url, login, method, params, callback libbz.makeXMLRPCCall(msg.data.url, msg.data.login, msg.data.method, msg.data.params, function(ret) { - worker.postMessage({ - payback: ret, - cbRPC: msg.data.callRPC - }); + worker.postMessage(new Message(msg.data.callRPC, ret)); }); break; case "GetURL": |