X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-export.c;h=840bd9190331dc8a1f96289ed252c678eba23bad;hb=a3245aed48dca435b437089bc81353da352fc0ce;hp=98964bf9014e1bc4ae3cb17f5840c81ae9622ca7;hpb=3535d4cb73628c720da1bf74627ded2aec6f2ca1;p=src%2Fapp-framework-binder.git diff --git a/src/afb-export.c b/src/afb-export.c index 98964bf9..840bd919 100644 --- a/src/afb-export.c +++ b/src/afb-export.c @@ -153,8 +153,6 @@ static void old_vverbose_cb(void *closure, int level, const char *file, int line static struct afb_eventid *eventid_make_cb(void *closure, const char *name) { - size_t plen, nlen; - char *event; struct afb_export *export = closure; /* check daemon state */ @@ -164,16 +162,8 @@ static struct afb_eventid *eventid_make_cb(void *closure, const char *name) return NULL; } - /* makes the event name */ - plen = strlen(export->apiname); - nlen = strlen(name); - event = alloca(nlen + plen + 2); - memcpy(event, export->apiname, plen); - event[plen] = '/'; - memcpy(event + plen + 1, name, nlen + 1); - /* create the event */ - return afb_evt_eventid_create(event); + return afb_evt_eventid_create2(export->apiname, name); } static struct afb_event event_make_cb(void *closure, const char *name)