Skip to content

Commit

Permalink
event_route: do not start external process in synch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Aug 11, 2014
1 parent b85d1f4 commit 9f36016
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/event_route/event_route.c
Expand Up @@ -123,7 +123,9 @@ static int mod_init(void)
return -1;
}

if (create_pipe() < 0) {
if (synch_mode) {
exports.procs = 0;
} else if (create_pipe() < 0) {
LM_ERR("cannot create communication pipe\n");
return -1;
}
Expand All @@ -138,7 +140,8 @@ static void destroy(void)
{
LM_NOTICE("destroy module ...\n");
/* closing sockets */
destroy_pipe();
if (!synch_mode)
destroy_pipe();
}


Expand All @@ -149,7 +152,7 @@ static int child_init(int rank)
str event_name;
int idx;

if (init_writer() < 0) {
if (!synch_mode && init_writer() < 0) {
LM_ERR("cannot init writing pipe\n");
return -1;
}
Expand Down

0 comments on commit 9f36016

Please sign in to comment.