diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-07-03 13:57:19 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-07-03 14:13:46 +0200 |
commit | 052c3aee6362b2e33c060e0fbddd68439bb73dcb (patch) | |
tree | acb632eac2bdd273a90fdda5a7982c507b83da9a /include/afb/afb-req-common.h | |
parent | 119e23a69678d0d71a81d8460b4bc0099c8c9729 (diff) |
Make status common
Make all error status for bindings use
a common convention: a negative value
means an error.
Change-Id: Id09610051295810f04f00477d7ec1d9771bf7975
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include/afb/afb-req-common.h')
-rw-r--r-- | include/afb/afb-req-common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/afb/afb-req-common.h b/include/afb/afb-req-common.h index df37739f..9fce668f 100644 --- a/include/afb/afb-req-common.h +++ b/include/afb/afb-req-common.h @@ -336,7 +336,7 @@ static inline int afb_req_unsubscribe(struct afb_req req, struct afb_event event * This call is made in the context of the request 'req'. * On completion, the function 'callback' is invoked with the * 'closure' given at call and two other parameters: 'iserror' and 'result'. - * 'iserror' is a boolean that indicates if the reply is an error reply. + * 'status' is 0 on success or negative when on an error reply. * 'result' is the json object of the reply, you must not call json_object_put * on the result. * @@ -353,7 +353,7 @@ static inline void afb_req_subcall(struct afb_req req, const char *api, const ch * Makes a call to the method of name 'api' / 'verb' with the object 'args'. * This call is made in the context of the request 'req'. * This call is synchronous, it waits untill completion of the request. - * It returns 0 on an error answer and returns 1 when no error was detected. + * It returns 0 on success or a negative value on error answer. * The object pointed by 'result' is filled and must be released by the caller * after its use by calling 'json_object_put'. * |