From 66275e3a326dc771c04cb6fbfdee68f09b66ee6c Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 17 Feb 2011 18:15:57 +0100 Subject: Make queryLocal and XML-RPC generally work again. --- lib/libbugzilla.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libbugzilla.js') 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(), -- cgit