From e02e41a5c1f95b1fe6ada50fc0051fb524fe90b4 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 23 Sep 2014 18:08:34 -0400 Subject: [PATCH 1/7] don't package mod_cluechoo and don't build/load by default --- build/modules.conf.in | 2 +- conf/vanilla/autoload_configs/modules.conf.xml | 2 +- debian/bootstrap.sh | 3 +-- debian/control-modules | 5 ----- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/build/modules.conf.in b/build/modules.conf.in index 71ece983ef..66b649f6f3 100644 --- a/build/modules.conf.in +++ b/build/modules.conf.in @@ -4,7 +4,7 @@ #applications/mod_blacklist #applications/mod_callcenter #applications/mod_cidlookup -applications/mod_cluechoo +#applications/mod_cluechoo applications/mod_commands applications/mod_conference #applications/mod_curl diff --git a/conf/vanilla/autoload_configs/modules.conf.xml b/conf/vanilla/autoload_configs/modules.conf.xml index d8a0b5cc68..e5a297e8af 100644 --- a/conf/vanilla/autoload_configs/modules.conf.xml +++ b/conf/vanilla/autoload_configs/modules.conf.xml @@ -60,7 +60,7 @@ - + diff --git a/debian/bootstrap.sh b/debian/bootstrap.sh index e9b77825a0..bc7da61c3f 100755 --- a/debian/bootstrap.sh +++ b/debian/bootstrap.sh @@ -15,6 +15,7 @@ avoid_mods=( applications/mod_osp applications/mod_rad_auth applications/mod_skel + applications/mod_cluechoo asr_tts/mod_cepstral codecs/mod_com_g729 codecs/mod_ilbc @@ -433,7 +434,6 @@ Depends: \${misc:Depends}, freeswitch (= \${binary:Version}), freeswitch-mod-voicemail (= \${binary:Version}), freeswitch-mod-esf (= \${binary:Version}), freeswitch-mod-fsv (= \${binary:Version}), - freeswitch-mod-cluechoo (= \${binary:Version}), freeswitch-mod-valet-parking (= \${binary:Version}), freeswitch-mod-httapi (= \${binary:Version}), freeswitch-mod-dialplan-xml (= \${binary:Version}), @@ -564,7 +564,6 @@ Recommends: freeswitch-mod-blacklist (= \${binary:Version}), freeswitch-mod-callcenter (= \${binary:Version}), freeswitch-mod-cidlookup (= \${binary:Version}), - freeswitch-mod-cluechoo (= \${binary:Version}), freeswitch-mod-commands (= \${binary:Version}), freeswitch-mod-conference (= \${binary:Version}), freeswitch-mod-curl (= \${binary:Version}), diff --git a/debian/control-modules b/debian/control-modules index 9246317117..715565c811 100644 --- a/debian/control-modules +++ b/debian/control-modules @@ -30,11 +30,6 @@ Description: Caller ID name lookup This module provides an API for querying caller ID name and location data. -Module: applications/mod_cluechoo -Description: Clue Choo - This demo module renders a Clue Choo train on the FreeSWITCH console. -Build-Depends: libncurses5-dev - Module: applications/mod_commands Description: Command module This module provides miscellaneous API commands. From c018c28738153349d17397b00beb462d2ce4c7f2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 24 Sep 2014 20:40:22 +0500 Subject: [PATCH 2/7] FS-6851 #resolve --- src/switch_channel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index d983110791..bfd20abc91 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -4203,7 +4203,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_get_variables(switch_channel_t *c { switch_status_t status; switch_mutex_lock(channel->profile_mutex); - status = switch_event_dup(event, channel->variables); + if (channel->variables) { + status = switch_event_dup(event, channel->variables); + } else { + status = switch_event_create(event, SWITCH_EVENT_CHANNEL_DATA); + } switch_mutex_unlock(channel->profile_mutex); return status; } From cd67dfc630637a2902b2aafee3ab60bfac832d67 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Wed, 24 Sep 2014 19:22:02 +0000 Subject: [PATCH 3/7] Add mod_cluechoo back to debian/control-modules The debian/control-modules file is a comprehensive list of modules, not a list of modules which are built. Our build tools verify the file is comprehensive, so modules can't be removed from here unless we're taking them out of tree. Partially revert "don't package mod_cluechoo and don't build/load by default" This partially reverts commit e02e41a5c1f95b1fe6ada50fc0051fb524fe90b4. --- debian/control-modules | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/control-modules b/debian/control-modules index 715565c811..9246317117 100644 --- a/debian/control-modules +++ b/debian/control-modules @@ -30,6 +30,11 @@ Description: Caller ID name lookup This module provides an API for querying caller ID name and location data. +Module: applications/mod_cluechoo +Description: Clue Choo + This demo module renders a Clue Choo train on the FreeSWITCH console. +Build-Depends: libncurses5-dev + Module: applications/mod_commands Description: Command module This module provides miscellaneous API commands. From 051772e4ae574c52adfca95d3811e2a06bc0e2e8 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Thu, 25 Sep 2014 10:47:18 +0000 Subject: [PATCH 4/7] Add fs_cli option to disable use of history file With this commit, passing -Q to fs_cli will cause fs_cli to not load or save the command history file (~/.fs_cli_history). This can be useful e.g. on read-only systems. This can also be set in the fs_cli configuration file with the option `no-history-file`. --- libs/esl/fs_cli.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c index 43c186b728..3610ae5219 100644 --- a/libs/esl/fs_cli.c +++ b/libs/esl/fs_cli.c @@ -61,6 +61,7 @@ typedef struct { int log_uuid; int log_uuid_length; int quiet; + int use_history_file; int batch_mode; char prompt_color[12]; char input_text_color[12]; @@ -1222,6 +1223,7 @@ static void read_config(const char *dft_cfile, const char *cfile) { esl_set_string(profiles[pcount].prompt_color, prompt_color); esl_set_string(profiles[pcount].input_text_color, input_text_color); esl_set_string(profiles[pcount].output_text_color, output_text_color); + profiles[pcount].use_history_file = 1; esl_log(ESL_LOG_DEBUG, "Found Profile [%s]\n", profiles[pcount].name); pcount++; } @@ -1257,6 +1259,8 @@ static void read_config(const char *dft_cfile, const char *cfile) { } } else if(!strcasecmp(var, "quiet")) { profiles[pcount-1].quiet = esl_true(val); + } else if(!strcasecmp(var, "no-history-file")) { + profiles[pcount-1].use_history_file = !esl_true(val); } else if(!strcasecmp(var, "prompt-color")) { esl_set_string(profiles[pcount-1].prompt_color, match_color(val)); } else if(!strcasecmp(var, "input-text-color")) { @@ -1298,6 +1302,8 @@ int main(int argc, char *argv[]) const char *line = NULL; char cmd_str[1024] = ""; cli_profile_t *profile = NULL; + int argv_use_history_file = 1; + int use_history_file = 0; #ifndef WIN32 char hfile[512] = "/tmp/fs_cli_history"; char cfile[512] = "/etc/fs_cli.conf"; @@ -1324,6 +1330,7 @@ int main(int argc, char *argv[]) {"log-uuid-short", 0, 0, 'S'}, {"quiet", 0, 0, 'q'}, {"batchmode", 0, 0, 'b'}, + {"no-history-file", 0, 0, 'Q'}, {"retry", 0, 0, 'r'}, {"interrupt", 0, 0, 'i'}, {"reconnect", 0, 0, 'R'}, @@ -1381,6 +1388,7 @@ int main(int argc, char *argv[]) esl_set_string(internal_profile.prompt_color, prompt_color); esl_set_string(internal_profile.input_text_color, input_text_color); esl_set_string(internal_profile.output_text_color, output_text_color); + internal_profile.use_history_file = 1; if (home) { snprintf(hfile, sizeof(hfile), "%s/.fs_cli_history", home); snprintf(cfile, sizeof(cfile), "%s/.fs_cli_conf", home); @@ -1395,7 +1403,7 @@ int main(int argc, char *argv[]) esl_global_set_default_logger(6); /* default debug level to 6 (info) */ for(;;) { int option_index = 0; - opt = getopt_long(argc, argv, "H:P:u:p:d:x:l:USt:T:qrRhib?n", options, &option_index); + opt = getopt_long(argc, argv, "H:P:u:p:d:x:l:USt:T:qQrRhib?n", options, &option_index); if (opt == -1) break; switch (opt) { case 'H': @@ -1450,6 +1458,9 @@ int main(int argc, char *argv[]) case 'b': argv_batch = 1; break; + case 'Q': + argv_use_history_file = 0; + break; case 'i': allow_ctl_c = 1; break; @@ -1505,6 +1516,9 @@ int main(int argc, char *argv[]) profile->batch_mode = 1; feature_level=0; } + if (argv_use_history_file && profile->use_history_file) { + use_history_file = 1; + } if (*argv_loglevel) { esl_set_string(profile->loglevel, argv_loglevel); profile->quiet = 0; @@ -1658,7 +1672,7 @@ int main(int argc, char *argv[]) } history(myhistory, &ev, H_SETSIZE, 800); el_set(el, EL_HIST, history, myhistory); - history(myhistory, &ev, H_LOAD, hfile); + if (use_history_file) history(myhistory, &ev, H_LOAD, hfile); el_source(el, NULL); #endif #ifdef WIN32 @@ -1712,7 +1726,7 @@ int main(int argc, char *argv[]) } #ifdef HAVE_LIBEDIT done: - history(myhistory, &ev, H_SAVE, hfile); + if (use_history_file) history(myhistory, &ev, H_SAVE, hfile); history_end(myhistory); el_end(el); #endif From 13d9e99ae772ced3d3f4e825201558c88a5cccd1 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Thu, 25 Sep 2014 13:18:02 +0000 Subject: [PATCH 5/7] Handle gcc quirk with parameter checking At least some versions of GCC appear to take any -Wno-foo option without error even if that option is not supported. But they will error out if -Wno-error=foo is used. This sounds like a GCC bug, but we'll work around it and test for the feature both ways. Thanks-to: Matteo Brancaleoni FS-6850 #resolve --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index dbb5a925f2..857a59e7a5 100644 --- a/configure.ac +++ b/configure.ac @@ -342,7 +342,7 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then saved_CFLAGS="$CFLAGS" AC_CACHE_CHECK([whether compiler supports -Wno-unused-result], [ac_cv_gcc_supports_w_no_unused_result], [ - CFLAGS="$CFLAGS -Wno-unused-result" + CFLAGS="$CFLAGS -Wno-unused-result -Wno-error=unused-result" AC_TRY_COMPILE([],[return 0;], [ac_cv_gcc_supports_w_no_unused_result=yes], [ac_cv_gcc_supports_w_no_unused_result=no])]) From 221af936d88b5eb79e0a706dab64cb882e650e4f Mon Sep 17 00:00:00 2001 From: Ken Rice Date: Tue, 23 Sep 2014 09:01:27 -0500 Subject: [PATCH 6/7] bump freeswitch verson in doxygen conf --- docs/Doxygen.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Doxygen.conf b/docs/Doxygen.conf index c087478179..41920106dc 100644 --- a/docs/Doxygen.conf +++ b/docs/Doxygen.conf @@ -31,7 +31,7 @@ PROJECT_NAME = "FreeSWITCH API Documentation" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 1.0.6 +PROJECT_NUMBER = 1.5.14b # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. From f7de058acdf2bdd915ea0b9c0db1634e4a84434c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 25 Sep 2014 21:43:57 +0500 Subject: [PATCH 7/7] FS-6854 #resolve --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/tport/ws.c | 20 +++++++++++++++----- src/mod/endpoints/mod_verto/ws.c | 20 +++++++++++++++----- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index cb2691c2a1..63605e55a1 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Wed Sep 24 01:09:42 CDT 2014 +Thu Sep 25 21:43:53 CDT 2014 diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/ws.c b/libs/sofia-sip/libsofia-sip-ua/tport/ws.c index 2fcd7021c0..7f4318e543 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/ws.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/ws.c @@ -332,19 +332,22 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block) ssize_t r; int err = 0; + wsh->x++; + if (wsh->x > 250) ms_sleep(1); + if (wsh->ssl) { do { r = SSL_read(wsh->ssl, data, bytes); - ms_sleep(10); - if (r == -1) { err = SSL_get_error(wsh->ssl, r); - + if (!block && err == SSL_ERROR_WANT_READ) { r = -2; goto end; } + + if (block) ms_sleep(10); } } while (r == -1 && err == SSL_ERROR_WANT_READ && wsh->x < 100); @@ -354,10 +357,17 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block) do { r = recv(wsh->sock, data, bytes, 0); - ms_sleep(10); + if (r == -1) { + if (!block && xp_is_blocking(xp_errno())) { + r = -2; + goto end; + } + + if (block) ms_sleep(10); + } } while (r == -1 && xp_is_blocking(xp_errno()) && wsh->x < 100); - if (wsh->x >= 100) { + if (wsh->x >= 1000 || (block && wsh->x >= 100)) { r = -1; } diff --git a/src/mod/endpoints/mod_verto/ws.c b/src/mod/endpoints/mod_verto/ws.c index 2fcd7021c0..7f4318e543 100644 --- a/src/mod/endpoints/mod_verto/ws.c +++ b/src/mod/endpoints/mod_verto/ws.c @@ -332,19 +332,22 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block) ssize_t r; int err = 0; + wsh->x++; + if (wsh->x > 250) ms_sleep(1); + if (wsh->ssl) { do { r = SSL_read(wsh->ssl, data, bytes); - ms_sleep(10); - if (r == -1) { err = SSL_get_error(wsh->ssl, r); - + if (!block && err == SSL_ERROR_WANT_READ) { r = -2; goto end; } + + if (block) ms_sleep(10); } } while (r == -1 && err == SSL_ERROR_WANT_READ && wsh->x < 100); @@ -354,10 +357,17 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block) do { r = recv(wsh->sock, data, bytes, 0); - ms_sleep(10); + if (r == -1) { + if (!block && xp_is_blocking(xp_errno())) { + r = -2; + goto end; + } + + if (block) ms_sleep(10); + } } while (r == -1 && xp_is_blocking(xp_errno()) && wsh->x < 100); - if (wsh->x >= 100) { + if (wsh->x >= 1000 || (block && wsh->x >= 100)) { r = -1; }