Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
binding-wrap: Rework of context handling
[src/app-framework-binder.git]
/
src
/
afb-api-dbus.c
diff --git
a/src/afb-api-dbus.c
b/src/afb-api-dbus.c
index
8c55ed0
..
1f254d1
100644
(file)
--- a/
src/afb-api-dbus.c
+++ b/
src/afb-api-dbus.c
@@
-15,7
+15,7
@@
* limitations under the License.
*/
* limitations under the License.
*/
-#if
defined(WITH_DBUS_TRANSPARENCY)
+#if
WITH_DBUS_TRANSPARENCY
#define _GNU_SOURCE
#define _GNU_SOURCE
@@
-45,6
+45,7
@@
#include "verbose.h"
#include "systemd.h"
#include "verbose.h"
#include "systemd.h"
+#include "jobs.h"
static const char DEFAULT_PATH_PREFIX[] = "/org/agl/afb/api/";
static const char DEFAULT_PATH_PREFIX[] = "/org/agl/afb/api/";
@@
-129,6
+130,7
@@
static struct api_dbus *make_api_dbus_3(int system, const char *path, size_t pat
}
/* choose the bus */
}
/* choose the bus */
+ jobs_acquire_event_manager();
sdbus = (system ? systemd_get_system_bus : systemd_get_user_bus)();
if (sdbus == NULL)
goto error2;
sdbus = (system ? systemd_get_system_bus : systemd_get_user_bus)();
if (sdbus == NULL)
goto error2;
@@
-664,7
+666,7
@@
struct origin
struct afb_cred *cred;
/* the origin */
struct afb_cred *cred;
/* the origin */
- char name[
1
];
+ char name[];
};
/* get the credentials for the message */
};
/* get the credentials for the message */
@@
-708,7
+710,7
@@
static struct origin *afb_api_dbus_server_origin_get(struct api_dbus *api, const
}
/* not found, create it */
}
/* not found, create it */
- origin = malloc(strlen(sender) + sizeof *origin);
+ origin = malloc(strlen(sender) +
1 +
sizeof *origin);
if (origin == NULL)
errno = ENOMEM;
else {
if (origin == NULL)
errno = ENOMEM;
else {