this.onerror = args.onerror;
this.onmethoderror = args.onmethoderror;
this.ontransporterror = args.ontransporterror;
+ this.callbackdata = args.callbackdata;
this.method = args.method;
this.params = args.params;
'oncomplete' : this.oncomplete,
'onerror' : this.onerror,
'onmethoderror' : this.onmethoderror,
- 'ontransporterror' : this.ontransporterror
+ 'ontransporterror' : this.ontransporterror,
+ 'callbackdata' : this.callbackdata
});
};
req.complete = true;
if(callbacks.oncomplete && !req.oncomplete_called) {
req.oncomplete_called = true;
- return callbacks.oncomplete(req);
+ return callbacks.oncomplete(req, callbacks.callbackdata);
}
}
}
if(req) {
req.response_queue.push(osrf_msg.payload());
if(callbacks.onresponse)
- return callbacks.onresponse(req);
+ return callbacks.onresponse(req, callbacks.callbackdata);
}
}
};
onresponse : this.args.onresponse,
oncomplete : this.args.oncomplete,
onerror : this.args.onerror,
- onmethoderror : this.method_error_handler()
+ onmethoderror : this.method_error_handler(),
+ callbackdata : this.args.callbackdata
}
);
};