From 0df4085c3dbd3a4bfbc602153e86b7b1b7f0f617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Zaprza=C5=82a?= Date: Wed, 18 Feb 2015 14:26:02 +0100 Subject: [PATCH 1/4] Fix race condition when callcenter member cancels the call. --- src/mod/applications/mod_callcenter/mod_callcenter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index 9f567120b8..6db5f8a2cd 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -1794,8 +1794,9 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa } else { /* Agent didn't answer or originate failed */ int delay_next_agent_call = 0; - sql = switch_mprintf("UPDATE members SET state = '%q', serving_agent = '', serving_system = ''" + sql = switch_mprintf("UPDATE members SET state = case state when '%q' then '%q' else state end, serving_agent = '', serving_system = ''" " WHERE serving_agent = '%q' AND serving_system = '%q' AND uuid = '%q' AND system = 'single_box'", + cc_member_state2str(CC_MEMBER_STATE_TRYING), /* Only switch to Waiting from Trying (state may be set to Abandoned in callcenter_function()) */ cc_member_state2str(CC_MEMBER_STATE_WAITING), h->agent_name, h->agent_system, h->member_uuid); cc_execute_sql(NULL, sql, NULL); From d6777e3aa1ec7c628f1b00593d88b9eee8993429 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 18 Feb 2015 13:35:28 -0600 Subject: [PATCH 2/4] FS-7066 FS-7253 FS-7231 #comment this should do it #resolve --- src/switch_time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/switch_time.c b/src/switch_time.c index 0a4a94d08c..8d51292e4b 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -415,10 +415,10 @@ static switch_status_t timerfd_start_interval(interval_timer_t *it, int interval val.it_interval.tv_sec = interval / 1000; val.it_interval.tv_nsec = (interval % 1000) * 1000000; - val.it_value.tv_sec = 0; + val.it_value.tv_sec = val.it_interval.tv_sec; val.it_value.tv_nsec = val.it_interval.tv_nsec; - if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &val, NULL) < 0) { + if (timerfd_settime(fd, 0, &val, NULL) < 0) { close(fd); return SWITCH_STATUS_GENERR; } @@ -1041,7 +1041,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime) spec.it_value.tv_sec = spec.it_interval.tv_sec; spec.it_value.tv_nsec = spec.it_interval.tv_nsec; - if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &spec, NULL)) { + if (timerfd_settime(tfd, 0, &spec, NULL)) { close(tfd); tfd = -1; } @@ -1109,7 +1109,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime) #ifdef HAVE_TIMERFD_CREATE if (last_MICROSECONDS_PER_TICK != runtime.microseconds_per_tick) { spec.it_interval.tv_nsec = runtime.microseconds_per_tick * 1000; - timerfd_settime(tfd, TFD_TIMER_ABSTIME, &spec, NULL); + timerfd_settime(tfd, 0, &spec, NULL); } last_MICROSECONDS_PER_TICK = runtime.microseconds_per_tick; From 0dfd08bc86e3065b2e118d421207485b93f3d5e4 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 18 Feb 2015 14:40:56 -0600 Subject: [PATCH 3/4] FS-7066 FS-7253 FS-7231 #comment wait, there's more.... need this too, let's never change this code again.... --- src/switch_time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/switch_time.c b/src/switch_time.c index 8d51292e4b..be3debf560 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -415,8 +415,8 @@ static switch_status_t timerfd_start_interval(interval_timer_t *it, int interval val.it_interval.tv_sec = interval / 1000; val.it_interval.tv_nsec = (interval % 1000) * 1000000; - val.it_value.tv_sec = val.it_interval.tv_sec; - val.it_value.tv_nsec = val.it_interval.tv_nsec; + val.it_value.tv_sec = 0; + val.it_value.tv_nsec = 100000; if (timerfd_settime(fd, 0, &val, NULL) < 0) { close(fd); @@ -1038,8 +1038,8 @@ SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime) if (tfd > -1) { spec.it_interval.tv_sec = 0; spec.it_interval.tv_nsec = runtime.microseconds_per_tick * 1000; - spec.it_value.tv_sec = spec.it_interval.tv_sec; - spec.it_value.tv_nsec = spec.it_interval.tv_nsec; + spec.it_value.tv_sec = 0; + spec.it_value.tv_nsec = 100000; if (timerfd_settime(tfd, 0, &spec, NULL)) { close(tfd); From 5febdbbc08a709b8580efe705830c538ad5de63b Mon Sep 17 00:00:00 2001 From: Brian West Date: Wed, 18 Feb 2015 15:45:05 -0600 Subject: [PATCH 4/4] FS-7297 #comment update the make target installer --- src/mod/codecs/mod_com_g729/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/codecs/mod_com_g729/Makefile.am b/src/mod/codecs/mod_com_g729/Makefile.am index e6586e159f..b311a7c641 100644 --- a/src/mod/codecs/mod_com_g729/Makefile.am +++ b/src/mod/codecs/mod_com_g729/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_com_g729 -VERSION=194 +VERSION=201501231218 if ISLINUX