diff --git a/lib/modem.js b/lib/modem.js index 5c54938..31ec775 100644 --- a/lib/modem.js +++ b/lib/modem.js @@ -14,11 +14,12 @@ var Modem = function(auth, hostname, namespace) { Modem.prototype.call = function(action, params, callback, ignore) { var fparams = [this.auth]; fparams = fparams.concat(params || []); - - if(this.protocol === "https:") { - var xmlClient = rpc.createSecureClient(this.hostname); + + var xmlClient; + if(this.protocol === 'https:') { + xmlClient = rpc.createSecureClient(this.hostname); } else { - var xmlClient = rpc.createClient(this.hostname); + xmlClient = rpc.createClient(this.hostname); } xmlClient.methodCall(this.namespace + action, fparams, function(error, value) { diff --git a/package.json b/package.json index f2bde82..cc81d2b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "opennebula", "description": "OpenNebula XML-RPC API client.", - "version": "1.0.8", + "version": "1.0.9", "author": "Pedro Dias ", "maintainers": [ "apocas "