X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=b9328687c9354e00110c2eb89ee2a990f9adb62b;hb=052c3aee6362b2e33c060e0fbddd68439bb73dcb;hp=fc1ec13e9f3cc4a3f731431a965b4790444174fd;hpb=b67e18b39830a01750721787bf3bdc5d71983144;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index fc1ec13e..b9328687 100644 --- a/src/main.c +++ b/src/main.c @@ -447,11 +447,11 @@ struct startup_req struct afb_session *session; }; -static void startup_call_reply(struct afb_xreq *xreq, int iserror, struct json_object *obj) +static void startup_call_reply(struct afb_xreq *xreq, int status, struct json_object *obj) { struct startup_req *sreq = CONTAINER_OF_XREQ(struct startup_req, xreq); - if (!iserror) + if (status >= 0) NOTICE("startup call %s returned %s", sreq->current->value, json_object_get_string(obj)); else { ERROR("startup call %s ERROR! %s", sreq->current->value, json_object_get_string(obj)); @@ -529,10 +529,15 @@ static void run_startup_calls() | job for starting the daemon +--------------------------------------------------------- */ -static void start() +static void start(int signum) { struct afb_hsrv *hsrv; + if (signum) { + ERROR("start aborted: received signal %s", strsignal(signum)); + exit(1); + } + // ------------------ sanity check ---------------------------------------- if (config->httpdPort <= 0) { ERROR("no port is defined");