X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-dbus.c;h=139c6472657ae186230a69bbef6eb4bc1c3b8ec2;hb=6dfeafe7e4fa582b3db3f950136bc97f8611fc6d;hp=562465e2b47429a534fbb39338c0bdde72ee367e;hpb=2ba7c200c6c4844b63f8f707a6f04017661f16ca;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-dbus.c b/src/afb-api-dbus.c index 562465e2..139c6472 100644 --- a/src/afb-api-dbus.c +++ b/src/afb-api-dbus.c @@ -635,7 +635,7 @@ error: static void afb_api_dbus_server_event_add(void *closure, const char *event, int eventid); static void afb_api_dbus_server_event_remove(void *closure, const char *event, int eventid); static void afb_api_dbus_server_event_push(void *closure, const char *event, int eventid, struct json_object *object); -static void afb_api_dbus_server_event_broadcast(void *closure, const char *event, int eventid, struct json_object *object); +static void afb_api_dbus_server_event_broadcast(void *closure, const char *event, struct json_object *object, const char *uuid); /* the interface for events broadcasting */ static const struct afb_evt_itf evt_broadcast_itf = { @@ -666,7 +666,7 @@ struct origin struct afb_cred *cred; /* the origin */ - char name[1]; + char name[]; }; /* get the credentials for the message */ @@ -710,7 +710,7 @@ static struct origin *afb_api_dbus_server_origin_get(struct api_dbus *api, const } /* not found, create it */ - origin = malloc(strlen(sender) + sizeof *origin); + origin = malloc(strlen(sender) + 1 + sizeof *origin); if (origin == NULL) errno = ENOMEM; else { @@ -917,7 +917,7 @@ static void afb_api_dbus_server_event_push(void *closure, const char *event, int json_object_put(object); } -static void afb_api_dbus_server_event_broadcast(void *closure, const char *event, int eventid, struct json_object *object) +static void afb_api_dbus_server_event_broadcast(void *closure, const char *event, struct json_object *object, const char *uuid) { int rc; struct api_dbus *api;