Skip to content

Commit

Permalink
Small refactor, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
apocas committed May 29, 2017
1 parent 36cc9b0 commit ccb0848
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/modem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opennebula",
"description": "OpenNebula XML-RPC API client.",
"version": "1.0.8",
"version": "1.0.9",
"author": "Pedro Dias <[email protected]>",
"maintainers": [
"apocas <[email protected]>"
Expand Down

0 comments on commit ccb0848

Please sign in to comment.