mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 05:48:33 +00:00
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@217 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
93233fd8f5
commit
24b9c3391e
14 files changed
+323
-364
No files matched your search
@@ -760,7 +760,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
|
||||
int res;
|
||||
int netfd;
|
||||
int refresh;
|
||||
struct iax_event *iaxevent = 0;
|
||||
struct iax_event *iaxevent = NULL;
|
||||
|
||||
load_config();
|
||||
|
||||
@@ -785,9 +785,10 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
|
||||
}
|
||||
|
||||
/* Wait for an event.*/
|
||||
if (!(iaxevent = iax_get_event(0))) {
|
||||
if ((iaxevent = iax_get_event(0)) == NULL) {
|
||||
switch_yield(1000);
|
||||
} else {
|
||||
continue;
|
||||
} else if (iaxevent) {
|
||||
struct private_object *tech_pvt = iax_get_private(iaxevent->session);
|
||||
|
||||
if (globals.debug && iaxevent->etype != IAX_EVENT_VOICE) {
|
||||
@@ -951,7 +952,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Don't know what to do with IAX event %d.\n", iaxevent->etype);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
iax_event_free(iaxevent);
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ static switch_status setup_formats(void)
|
||||
char buffer [128] ;
|
||||
int format, major_count, subtype_count, m, s ;
|
||||
int len,x,skip;
|
||||
char *extras[] = {"r8", "r16", "r24", "r32", "gsm"};
|
||||
char *extras[] = {"r8", "r16", "r24", "r32", "gsm", NULL};
|
||||
int exlen = (sizeof(extras) / sizeof(extras[0]));
|
||||
buffer [0] = 0 ;
|
||||
sf_command (NULL, SFC_GET_LIB_VERSION, buffer, sizeof (buffer)) ;
|
||||
@@ -238,7 +238,7 @@ static switch_status setup_formats(void)
|
||||
sfinfo.channels = 1 ;
|
||||
len = ((major_count + (exlen + 2)) * sizeof(char *));
|
||||
*supported_formats = switch_core_permenant_alloc(len);
|
||||
memset(supported_formats, 0, len);
|
||||
//memset(supported_formats, 0, len);
|
||||
|
||||
len = 0;
|
||||
for (m = 0 ; m < major_count ; m++) {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <speex.h>
|
||||
#include <speex/speex.h>
|
||||
#include <speex/speex_preprocess.h>
|
||||
|
||||
static const char modname[] = "mod_speexcodec";
|
||||
|
||||
@@ -1358,10 +1358,17 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
|
||||
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "OH OH no pool\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
//switch_console_printf(SWITCH_CHANNEL_CONSOLE, "OH OH no pool\n");
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
//switch_console_printf(SWITCH_CHANNEL_CONSOLE, "OH OH no pool\n");
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (switch_mutex_init(&default_profile.iolock, SWITCH_MUTEX_NESTED, module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "OH OH no lock\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
|
||||
Reference in new issue
Block a user