X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=bindings%2Fsamples%2FHelloWorld.c;h=cb4a5a4ad0e79b3c8539b8eb9bc93811e912dca3;hb=6797f9722dd3e5463e0f7c118397955bb59a40c7;hp=9e14befac31c7c115b65793bd8b00a41ff1f1462;hpb=20ea5089d0e5526afaa5231f30add7b25b2499bd;p=src%2Fapp-framework-binder.git diff --git a/bindings/samples/HelloWorld.c b/bindings/samples/HelloWorld.c index 9e14befa..cb4a5a4a 100644 --- a/bindings/samples/HelloWorld.c +++ b/bindings/samples/HelloWorld.c @@ -245,6 +245,11 @@ static void eventpush (struct afb_req request) afb_req_success(request, NULL, NULL); } +static void exitnow (struct afb_req request) +{ + exit(0); +} + // NOTE: this sample does not use session to keep test a basic as possible // in real application most APIs should be protected with AFB_SESSION_CHECK static const struct afb_verb_desc_v1 verbs[]= { @@ -260,6 +265,7 @@ static const struct afb_verb_desc_v1 verbs[]= { {"eventsub", AFB_SESSION_NONE, eventsub , "subscribes to the event of 'tag'"}, {"eventunsub",AFB_SESSION_NONE, eventunsub , "unsubscribes to the event of 'tag'"}, {"eventpush", AFB_SESSION_NONE, eventpush , "pushs the event of 'tag' with the 'data'"}, + {"exit", AFB_SESSION_NONE, exitnow , "exits from afb-daemon"}, {NULL} };