Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx> --- exec/ipc_glue.c | 11 ++++++++--- exec/main.h | 2 +- exec/service.c | 5 ++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/exec/ipc_glue.c b/exec/ipc_glue.c index fa59a98..a58c8e7 100644 --- a/exec/ipc_glue.c +++ b/exec/ipc_glue.c @@ -801,14 +801,14 @@ void cs_ipcs_stats_update(void) } } -void cs_ipcs_service_init(struct corosync_service_engine *service) +const char *cs_ipcs_service_init(struct corosync_service_engine *service) { if (service->lib_engine_count == 0) { log_printf (LOGSYS_LEVEL_DEBUG, "NOT Initializing IPC on %s [%d]", cs_ipcs_serv_short_name(service->id), service->id); - return; + return NULL; } ipcs_mapper[service->id].id = service->id; strcpy(ipcs_mapper[service->id].name, cs_ipcs_serv_short_name(service->id)); @@ -823,7 +823,12 @@ void cs_ipcs_service_init(struct corosync_service_engine *service) assert(ipcs_mapper[service->id].inst); qb_ipcs_poll_handlers_set(ipcs_mapper[service->id].inst, &corosync_poll_funcs); - qb_ipcs_run(ipcs_mapper[service->id].inst); + if (qb_ipcs_run(ipcs_mapper[service->id].inst) != 0) { + log_printf (LOGSYS_LEVEL_ERROR, "Can't initialize IPC"); + return "qb_ipcs_run error"; + } + + return NULL; } void cs_ipcs_init(void) diff --git a/exec/main.h b/exec/main.h index 13b7e12..b65f0ae 100644 --- a/exec/main.h +++ b/exec/main.h @@ -93,7 +93,7 @@ extern void corosync_recheck_the_q_level(void *data); extern void cs_ipcs_init(void); -extern void cs_ipcs_service_init(struct corosync_service_engine *service); +extern const char *cs_ipcs_service_init(struct corosync_service_engine *service); extern void cs_ipcs_stats_update(void); diff --git a/exec/service.c b/exec/service.c index eaacfbb..f998306 100644 --- a/exec/service.c +++ b/exec/service.c @@ -172,7 +172,10 @@ char *corosync_service_link_and_init ( log_printf (LOGSYS_LEVEL_NOTICE, "Service engine loaded: %s [%d]", service_engine->name, service_engine->id); - cs_ipcs_service_init(service_engine); + init_result = (char *)cs_ipcs_service_init(service_engine); + if (init_result != NULL) { + return (init_result); + } return NULL; } -- 1.7.1 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss