X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=action.cpp;h=514c01600c5de1213b8334ee8c8874c23f3c90af;hp=352efb40e30abc8202b4de6b14d866425c0888ec;hb=97aa0881beacf536e3a2296381c055887583db8f;hpb=0eebd3a28e968844ec459298ac36e16305cc07bb diff --git a/action.cpp b/action.cpp index 352efb4..514c016 100644 --- a/action.cpp +++ b/action.cpp @@ -2003,10 +2003,8 @@ void EndpointAppPBX::action_execute(void) if ((pid2 = fork()) == 0) { execve(command, argv, environ); } - else { - /* Exit immediately and release the waiting parent. The subprocess falls to init because the parent died */ - exit(0); - } + /* Exit immediately and release the waiting parent. The subprocess falls to init because the parent died */ + exit(0); break; default: trace_header("ACTION execute", DIRECTION_NONE); @@ -2285,11 +2283,12 @@ void EndpointAppPBX::process_dialing(int timeout) } gettimeofday(¤t_time, NULL); - if (timeout && TIME_SMALLER(&e_match_timeout.timeout, ¤t_time)) { + if (e_match_to_action && TIME_SMALLER(&e_match_timeout.timeout, ¤t_time)) { /* return timeout rule */ PDEBUG(DEBUG_EPOINT, "EPOINT(%d): terminal '%s' dialing: '%s', timeout in ruleset '%s'\n", ea_endpoint->ep_serial, e_ext.number, e_dialinginfo.id, e_ruleset->name); unsched_timer(&e_match_timeout); e_action = e_match_to_action; + e_match_to_action = NULL; e_extdialing = e_match_to_extdialing; trace_header("ROUTING (timeout)", DIRECTION_NONE); add_trace("action", NULL, "%s", action_defs[e_action->index].name);