part 3 of 3 standardizing typedefed types to end in _t.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1300 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2006-04-29 23:43:28 +00:00
parent 76f4a10a18
commit 14fee78470
60 changed files with 957 additions and 957 deletions
@@ -80,13 +80,13 @@ static void audio_bridge_function(switch_core_session_t *session, char *data)
}
static const switch_application_interface bridge_application_interface = {
static const switch_application_interface_t bridge_application_interface = {
/*.interface_name */ "bridge",
/*.application_function */ audio_bridge_function
};
static const switch_loadable_module_interface mod_bridgecall_module_interface = {
static const switch_loadable_module_interface_t mod_bridgecall_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@@ -95,7 +95,7 @@ static const switch_loadable_module_interface mod_bridgecall_module_interface =
/*.application_interface */ &bridge_application_interface
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
@@ -34,14 +34,14 @@
static const char modname[] = "mod_commands";
static switch_status load_function(char *mod, char *out, size_t outlen)
static switch_status_t load_function(char *mod, char *out, size_t outlen)
{
switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) mod);
snprintf(out, outlen, "OK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status kill_function(char *dest, char *out, size_t outlen)
static switch_status_t kill_function(char *dest, char *out, size_t outlen)
{
switch_core_session_t *session = NULL;
@@ -59,7 +59,7 @@ static switch_status kill_function(char *dest, char *out, size_t outlen)
}
static switch_status transfer_function(char *cmd, char *out, size_t outlen)
static switch_status_t transfer_function(char *cmd, char *out, size_t outlen)
{
switch_core_session_t *session = NULL;
char *argv[4] = {0};
@@ -96,7 +96,7 @@ static switch_status transfer_function(char *cmd, char *out, size_t outlen)
static switch_status pause_function(char *cmd, char *out, size_t outlen)
static switch_status_t pause_function(char *cmd, char *out, size_t outlen)
{
switch_core_session_t *session = NULL;
char *argv[4] = {0};
@@ -130,21 +130,21 @@ static switch_status pause_function(char *cmd, char *out, size_t outlen)
}
static struct switch_api_interface pause_api_interface = {
static switch_api_interface_t pause_api_interface = {
/*.interface_name */ "pause",
/*.desc */ "Pause",
/*.function */ pause_function,
/*.next */ NULL
};
static struct switch_api_interface transfer_api_interface = {
static switch_api_interface_t transfer_api_interface = {
/*.interface_name */ "transfer",
/*.desc */ "Transfer",
/*.function */ transfer_function,
/*.next */ &pause_api_interface
};
static struct switch_api_interface load_api_interface = {
static switch_api_interface_t load_api_interface = {
/*.interface_name */ "load",
/*.desc */ "Load Modile",
/*.function */ load_function,
@@ -152,7 +152,7 @@ static struct switch_api_interface load_api_interface = {
};
static struct switch_api_interface commands_api_interface = {
static switch_api_interface_t commands_api_interface = {
/*.interface_name */ "killchan",
/*.desc */ "Kill Channel",
/*.function */ kill_function,
@@ -160,7 +160,7 @@ static struct switch_api_interface commands_api_interface = {
};
static const switch_loadable_module_interface mod_commands_module_interface = {
static const switch_loadable_module_interface_t mod_commands_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -171,7 +171,7 @@ static const switch_loadable_module_interface mod_commands_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
+3 -3
View File
@@ -45,13 +45,13 @@ static void echo_function(switch_core_session_t *session, char *data)
switch_channel_set_state(channel, CS_LOOPBACK);
}
static const switch_application_interface echo_application_interface = {
static const switch_application_interface_t echo_application_interface = {
/*.interface_name */ "echo",
/*.application_function */ echo_function,
NULL,NULL,NULL,NULL
};
static switch_loadable_module_interface echo_module_interface = {
static switch_loadable_module_interface_t echo_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -64,7 +64,7 @@ static switch_loadable_module_interface echo_module_interface = {
/*.directory_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &echo_module_interface;
+12 -12
View File
@@ -39,7 +39,7 @@ static const char modname[] = "mod_ivrtest";
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
static switch_status on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
@@ -61,7 +61,7 @@ static void dirtest_function(switch_core_session_t *session, char *data)
{
char *var, *val;
switch_channel_t *channel;
switch_directory_handle dh;
switch_directory_handle_t dh;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -90,7 +90,7 @@ static void dirtest_function(switch_core_session_t *session, char *data)
}
static switch_status show_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t show_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
@@ -137,7 +137,7 @@ static void tts_function(switch_core_session_t *session, char *data)
static void ivrtest_function(switch_core_session_t *session, char *data)
{
switch_channel_t *channel;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_codec_t *codec;
char buf[10] = "";
char term;
@@ -182,7 +182,7 @@ static void ivrtest_function(switch_core_session_t *session, char *data)
}
static switch_status my_on_hangup(switch_core_session_t *session)
static switch_status_t my_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel;
@@ -204,35 +204,35 @@ static const switch_state_handler_table_t state_handlers = {
};
static const switch_application_interface disast_application_interface = {
static const switch_application_interface_t disast_application_interface = {
/*.interface_name */ "disast",
/*.application_function */ disast_function,
NULL, NULL, NULL,
/*.next*/ NULL
};
static const switch_application_interface tts_application_interface = {
static const switch_application_interface_t tts_application_interface = {
/*.interface_name */ "tts",
/*.application_function */ tts_function,
NULL, NULL, NULL,
/*.next*/ &disast_application_interface
};
static const switch_application_interface dirtest_application_interface = {
static const switch_application_interface_t dirtest_application_interface = {
/*.interface_name */ "dirtest",
/*.application_function */ dirtest_function,
NULL, NULL, NULL,
/*.next*/ &tts_application_interface
};
static const switch_application_interface ivrtest_application_interface = {
static const switch_application_interface_t ivrtest_application_interface = {
/*.interface_name */ "ivrtest",
/*.application_function */ ivrtest_function,
NULL, NULL, NULL,
/*.next*/ &dirtest_application_interface
};
static const switch_loadable_module_interface mod_ivrtest_module_interface = {
static const switch_loadable_module_interface_t mod_ivrtest_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@@ -241,7 +241,7 @@ static const switch_loadable_module_interface mod_ivrtest_module_interface = {
/*.application_interface */ &ivrtest_application_interface
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
@@ -259,4 +259,4 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
*/
//switch_status switch_module_runtime(void)
//switch_status_t switch_module_runtime(void)
@@ -37,7 +37,7 @@ static const char modname[] = "mod_playback";
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
static switch_status on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
@@ -85,19 +85,19 @@ static void record_function(switch_core_session_t *session, char *data)
}
static const switch_application_interface record_application_interface = {
static const switch_application_interface_t record_application_interface = {
/*.interface_name */ "record",
/*.application_function */ record_function
};
static const switch_application_interface playback_application_interface = {
static const switch_application_interface_t playback_application_interface = {
/*.interface_name */ "playback",
/*.application_function */ playback_function,
NULL,NULL,NULL,
/*.next*/ &record_application_interface
};
static const switch_loadable_module_interface mod_playback_module_interface = {
static const switch_loadable_module_interface_t mod_playback_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@@ -106,7 +106,7 @@ static const switch_loadable_module_interface mod_playback_module_interface = {
/*.application_interface */ &playback_application_interface
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
@@ -122,4 +122,4 @@ if it returns anything but SWITCH_STATUS_TERM it will be called again automaticl
*/
//switch_status switch_module_runtime(void)
//switch_status_t switch_module_runtime(void)
+9 -9
View File
@@ -78,7 +78,7 @@ static swift_result_t write_audio(swift_event *event, swift_event_t type, void *
return rv;
}
static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_name, int rate, switch_speech_flag *flags)
static switch_status_t cepstral_speech_open(switch_speech_handle_t *sh, char *voice_name, int rate, switch_speech_flag_t *flags)
{
if (*flags & SWITCH_SPEECH_FLAG_ASR) {
return SWITCH_STATUS_FALSE;
@@ -142,7 +142,7 @@ static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_
return SWITCH_STATUS_FALSE;
}
static switch_status cepstral_speech_close(switch_speech_handle *sh, switch_speech_flag *flags)
static switch_status_t cepstral_speech_close(switch_speech_handle_t *sh, switch_speech_flag_t *flags)
{
cepstral_t *cepstral;
@@ -160,7 +160,7 @@ static switch_status cepstral_speech_close(switch_speech_handle *sh, switch_spee
return SWITCH_STATUS_SUCCESS;
}
static switch_status cepstral_speech_feed_tts(switch_speech_handle *sh, char *text, switch_speech_flag *flags)
static switch_status_t cepstral_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags)
{
cepstral_t *cepstral;
@@ -176,15 +176,15 @@ static switch_status cepstral_speech_feed_tts(switch_speech_handle *sh, char *te
return SWITCH_STATUS_FALSE;
}
static switch_status cepstral_speech_read_tts(switch_speech_handle *sh,
static switch_status_t cepstral_speech_read_tts(switch_speech_handle_t *sh,
void *data,
size_t *datalen,
uint32_t *rate,
switch_speech_flag *flags)
switch_speech_flag_t *flags)
{
cepstral_t *cepstral;
size_t desired = *datalen;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
size_t used, padding = 0;
assert(sh != NULL);
@@ -245,7 +245,7 @@ static switch_status cepstral_speech_read_tts(switch_speech_handle *sh,
return status;
}
static const switch_speech_interface cepstral_speech_interface = {
static const switch_speech_interface_t cepstral_speech_interface = {
/*.interface_name*/ "cepstral",
/*.speech_open*/ cepstral_speech_open,
/*.speech_close*/ cepstral_speech_close,
@@ -256,7 +256,7 @@ static const switch_speech_interface cepstral_speech_interface = {
};
static const switch_loadable_module_interface cepstral_module_interface = {
static const switch_loadable_module_interface_t cepstral_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -269,7 +269,7 @@ static const switch_loadable_module_interface cepstral_module_interface = {
/*.directory_interface */ NULL
};
switch_status switch_module_load(const switch_loadable_module_interface **interface, char *filename)
switch_status_t switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* Open the Swift TTS Engine */
+12 -12
View File
@@ -36,7 +36,7 @@
static const char modname[] = "mod_g711codec";
static switch_status switch_g711u_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_g711u_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
int encoding, decoding;
@@ -52,7 +52,7 @@ static switch_status switch_g711u_init(switch_codec_t *codec, switch_codec_flag
}
static switch_status switch_g711u_encode(switch_codec_t *codec,
static switch_status_t switch_g711u_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@@ -76,7 +76,7 @@ static switch_status switch_g711u_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711u_decode(switch_codec_t *codec,
static switch_status_t switch_g711u_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@@ -105,13 +105,13 @@ static switch_status switch_g711u_decode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711u_destroy(switch_codec_t *codec)
static switch_status_t switch_g711u_destroy(switch_codec_t *codec)
{
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711a_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_g711a_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
int encoding, decoding;
@@ -127,7 +127,7 @@ static switch_status switch_g711a_init(switch_codec_t *codec, switch_codec_flag
}
static switch_status switch_g711a_encode(switch_codec_t *codec,
static switch_status_t switch_g711a_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@@ -151,7 +151,7 @@ static switch_status switch_g711a_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711a_decode(switch_codec_t *codec,
static switch_status_t switch_g711a_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@@ -180,7 +180,7 @@ static switch_status switch_g711a_decode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711a_destroy(switch_codec_t *codec)
static switch_status_t switch_g711a_destroy(switch_codec_t *codec)
{
return SWITCH_STATUS_SUCCESS;
}
@@ -275,7 +275,7 @@ static const switch_codec_implementation_t g711a_8k_implementation = {
};
static const switch_codec_interface g711a_codec_interface = {
static const switch_codec_interface_t g711a_codec_interface = {
/*.interface_name */ "g711 alaw",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
@@ -283,7 +283,7 @@ static const switch_codec_interface g711a_codec_interface = {
/*.implementations */ &g711a_8k_implementation
};
static const switch_codec_interface g711u_codec_interface = {
static const switch_codec_interface_t g711u_codec_interface = {
/*.interface_name */ "g711 ulaw",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
@@ -292,7 +292,7 @@ static const switch_codec_interface g711u_codec_interface = {
/*.next */ &g711a_codec_interface
};
static switch_loadable_module_interface g711_module_interface = {
static switch_loadable_module_interface_t g711_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -302,7 +302,7 @@ static switch_loadable_module_interface g711_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &g711_module_interface;
+7 -7
View File
@@ -42,7 +42,7 @@ struct g729_context {
};
static switch_status switch_g729_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_g729_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
@@ -72,7 +72,7 @@ static switch_status switch_g729_init(switch_codec_t *codec, switch_codec_flag f
}
static switch_status switch_g729_destroy(switch_codec_t *codec)
static switch_status_t switch_g729_destroy(switch_codec_t *codec)
{
codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
@@ -80,7 +80,7 @@ static switch_status switch_g729_destroy(switch_codec_t *codec)
static switch_status switch_g729_encode(switch_codec_t *codec,
static switch_status_t switch_g729_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
@@ -127,7 +127,7 @@ static switch_status switch_g729_encode(switch_codec_t *codec,
static switch_status switch_g729_decode(switch_codec_t *codec,
static switch_status_t switch_g729_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
@@ -252,7 +252,7 @@ static const switch_codec_implementation_t g729_8k_implementation = {
};
static const switch_codec_interface g729_codec_interface = {
static const switch_codec_interface_t g729_codec_interface = {
/*.interface_name */ "g729",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 18,
@@ -261,7 +261,7 @@ static const switch_codec_interface g729_codec_interface = {
};
static switch_loadable_module_interface g729_module_interface = {
static switch_loadable_module_interface_t g729_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -272,7 +272,7 @@ static switch_loadable_module_interface g729_module_interface = {
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface,
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
char *filename)
{
+7 -7
View File
@@ -36,7 +36,7 @@ struct gsm_context {
gsm encoder;
gsm decoder;
};
static switch_status switch_gsm_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_gsm_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
struct gsm_context *context;
@@ -55,7 +55,7 @@ static switch_status switch_gsm_init(switch_codec_t *codec, switch_codec_flag fl
codec->private_info = context;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_destroy(switch_codec_t *codec)
static switch_status_t switch_gsm_destroy(switch_codec_t *codec)
{
struct gsm_context *context = codec->private_info;
int encoding = (codec->flags & SWITCH_CODEC_FLAG_ENCODE);
@@ -67,7 +67,7 @@ static switch_status switch_gsm_destroy(switch_codec_t *codec)
codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data,
static switch_status_t switch_gsm_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data,
uint32_t decoded_data_len, uint32_t decoded_rate, void *encoded_data,
uint32_t *encoded_data_len, uint32_t *encoded_rate, unsigned int *flag)
{
@@ -96,7 +96,7 @@ static switch_status switch_gsm_encode(switch_codec_t *codec, switch_codec_t *ot
}
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data,
static switch_status_t switch_gsm_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data,
uint32_t encoded_data_len, uint32_t encoded_rate, void *decoded_data,
uint32_t *decoded_data_len, uint32_t *decoded_rate, unsigned int *flag)
{
@@ -147,14 +147,14 @@ static const switch_codec_implementation_t gsm_8k_implementation = {
/*.decode */ switch_gsm_decode,
/*.destroy */ switch_gsm_destroy,
};
static const switch_codec_interface gsm_codec_interface = {
static const switch_codec_interface_t gsm_codec_interface = {
/*.interface_name */ "gsm",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 3,
/*.iananame */ "gsm",
/*.implementations */ &gsm_8k_implementation,
};
static switch_loadable_module_interface gsm_module_interface = {
static switch_loadable_module_interface_t gsm_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -162,7 +162,7 @@ static switch_loadable_module_interface gsm_module_interface = {
/*.codec_interface */ &gsm_codec_interface,
/*.application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface,
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
char *filename)
{
+9 -9
View File
@@ -44,7 +44,7 @@ struct ilbc_context {
uint16_t dbytes;
};
static switch_status switch_ilbc_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_ilbc_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
struct ilbc_context *context;
@@ -86,14 +86,14 @@ static switch_status switch_ilbc_init(switch_codec_t *codec, switch_codec_flag f
}
static switch_status switch_ilbc_destroy(switch_codec_t *codec)
static switch_status_t switch_ilbc_destroy(switch_codec_t *codec)
{
codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_ilbc_encode(switch_codec_t *codec,
static switch_status_t switch_ilbc_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@@ -136,7 +136,7 @@ static switch_status switch_ilbc_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_ilbc_decode(switch_codec_t *codec,
static switch_status_t switch_ilbc_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@@ -236,7 +236,7 @@ static const switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation =
};
static const switch_codec_interface ilbc_20ms_codec_interface = {
static const switch_codec_interface_t ilbc_20ms_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
@@ -244,7 +244,7 @@ static const switch_codec_interface ilbc_20ms_codec_interface = {
/*.implementations */ &ilbc_8k_20ms_nonext_implementation
};
static const switch_codec_interface ilbc_102_codec_interface = {
static const switch_codec_interface_t ilbc_102_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 102,
@@ -253,7 +253,7 @@ static const switch_codec_interface ilbc_102_codec_interface = {
/*.next*/ &ilbc_20ms_codec_interface
};
static const switch_codec_interface ilbc_codec_interface = {
static const switch_codec_interface_t ilbc_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
@@ -263,7 +263,7 @@ static const switch_codec_interface ilbc_codec_interface = {
};
static switch_loadable_module_interface ilbc_module_interface = {
static switch_loadable_module_interface_t ilbc_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -274,7 +274,7 @@ static switch_loadable_module_interface ilbc_module_interface = {
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface,
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
char *filename)
{
+7 -7
View File
@@ -34,7 +34,7 @@
static const char modname[] = "mod_rawaudio";
static switch_status switch_raw_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_raw_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
int encoding, decoding;
@@ -49,7 +49,7 @@ static switch_status switch_raw_init(switch_codec_t *codec, switch_codec_flag fl
}
}
static switch_status switch_raw_encode(switch_codec_t *codec,
static switch_status_t switch_raw_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@@ -67,7 +67,7 @@ static switch_status switch_raw_encode(switch_codec_t *codec,
return SWITCH_STATUS_NOOP;
}
static switch_status switch_raw_decode(switch_codec_t *codec,
static switch_status_t switch_raw_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@@ -84,7 +84,7 @@ static switch_status switch_raw_decode(switch_codec_t *codec,
}
static switch_status switch_raw_destroy(switch_codec_t *codec)
static switch_status_t switch_raw_destroy(switch_codec_t *codec)
{
return SWITCH_STATUS_SUCCESS;
@@ -176,7 +176,7 @@ static const switch_codec_implementation_t raw_8k_30ms_implementation = {
};
static const switch_codec_interface raw_codec_interface = {
static const switch_codec_interface_t raw_codec_interface = {
/*.interface_name */ "raw signed linear (16 bit)",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
@@ -184,7 +184,7 @@ static const switch_codec_interface raw_codec_interface = {
/*.implementations */ &raw_8k_30ms_implementation
};
static switch_loadable_module_interface raw_module_interface = {
static switch_loadable_module_interface_t raw_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -196,7 +196,7 @@ static switch_loadable_module_interface raw_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &raw_module_interface;
+7 -7
View File
@@ -72,7 +72,7 @@ struct speex_context {
int decoder_mode;
};
static switch_status switch_speex_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
struct speex_context *context = NULL;
@@ -157,7 +157,7 @@ static switch_status switch_speex_init(switch_codec_t *codec, switch_codec_flag
}
}
static switch_status switch_speex_encode(switch_codec_t *codec,
static switch_status_t switch_speex_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@@ -212,7 +212,7 @@ static switch_status switch_speex_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_speex_decode(switch_codec_t *codec,
static switch_status_t switch_speex_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@@ -239,7 +239,7 @@ static switch_status switch_speex_decode(switch_codec_t *codec,
}
static switch_status switch_speex_destroy(switch_codec_t *codec)
static switch_status_t switch_speex_destroy(switch_codec_t *codec)
{
int encoding, decoding;
struct speex_context *context = codec->private_info;
@@ -317,7 +317,7 @@ static const switch_codec_implementation_t speex_8k_implementation = {
/*.next */ &speex_16k_implementation
};
static const switch_codec_interface speex_codec_interface = {
static const switch_codec_interface_t speex_codec_interface = {
/*.interface_name */ "speex",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 98,
@@ -325,7 +325,7 @@ static const switch_codec_interface speex_codec_interface = {
/*.implementations */ &speex_8k_implementation
};
static switch_loadable_module_interface speex_module_interface = {
static switch_loadable_module_interface_t speex_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -334,7 +334,7 @@ static switch_loadable_module_interface speex_module_interface = {
/*.application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &speex_module_interface;
@@ -102,13 +102,13 @@ static switch_caller_extension_t *demo_dialplan_hunt(switch_core_session_t *sess
}
static const switch_dialplan_interface demo_dialplan_interface = {
static const switch_dialplan_interface_t demo_dialplan_interface = {
/*.interface_name = */ "demo",
/*.hunt_function = */ demo_dialplan_hunt
/*.next = NULL */
};
static const switch_loadable_module_interface demo_dialplan_module_interface = {
static const switch_loadable_module_interface_t demo_dialplan_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@@ -117,7 +117,7 @@ static const switch_loadable_module_interface demo_dialplan_module_interface = {
/*.application_interface = */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
@@ -89,7 +89,7 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t
switch_channel_t *channel;
char *var, *val;
char filter[256];
switch_directory_handle dh;
switch_directory_handle_t dh;
char app[512];
char *data;
@@ -153,13 +153,13 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t
}
static const switch_dialplan_interface directory_dialplan_interface = {
static const switch_dialplan_interface_t directory_dialplan_interface = {
/*.interface_name = */ "directory",
/*.hunt_function = */ directory_dialplan_hunt
/*.next = NULL */
};
static const switch_loadable_module_interface directory_dialplan_module_interface = {
static const switch_loadable_module_interface_t directory_dialplan_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@@ -168,7 +168,7 @@ static const switch_loadable_module_interface directory_dialplan_module_interfac
/*.application_interface = */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
load_config();
+3 -3
View File
@@ -198,13 +198,13 @@ static switch_caller_extension_t *dialplan_hunt(switch_core_session_t *session)
}
static const switch_dialplan_interface dialplan_interface = {
static const switch_dialplan_interface_t dialplan_interface = {
/*.interface_name = */ "pcre",
/*.hunt_function = */ dialplan_hunt
/*.next = NULL */
};
static const switch_loadable_module_interface dialplan_module_interface = {
static const switch_loadable_module_interface_t dialplan_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@@ -213,7 +213,7 @@ static const switch_loadable_module_interface dialplan_module_interface = {
/*.application_interface = */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
+8 -8
View File
@@ -57,7 +57,7 @@ struct ldap_context {
};
static switch_status mod_ldap_open(switch_directory_handle *dh, char *source, char *dsn, char *passwd)
static switch_status_t mod_ldap_open(switch_directory_handle_t *dh, char *source, char *dsn, char *passwd)
{
struct ldap_context *context;
int auth_method = LDAP_AUTH_SIMPLE;
@@ -86,7 +86,7 @@ static switch_status mod_ldap_open(switch_directory_handle *dh, char *source, ch
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_close(switch_directory_handle *dh)
static switch_status_t mod_ldap_close(switch_directory_handle_t *dh)
{
struct ldap_context *context;
@@ -98,7 +98,7 @@ static switch_status mod_ldap_close(switch_directory_handle *dh)
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_query(switch_directory_handle *dh, char *base, char *query)
static switch_status_t mod_ldap_query(switch_directory_handle_t *dh, char *base, char *query)
{
struct ldap_context *context;
@@ -116,7 +116,7 @@ static switch_status mod_ldap_query(switch_directory_handle *dh, char *base, cha
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_next(switch_directory_handle *dh)
static switch_status_t mod_ldap_next(switch_directory_handle_t *dh)
{
struct ldap_context *context;
@@ -140,7 +140,7 @@ static switch_status mod_ldap_next(switch_directory_handle *dh)
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_next_pair(switch_directory_handle *dh, char **var, char **val)
static switch_status_t mod_ldap_next_pair(switch_directory_handle_t *dh, char **var, char **val)
{
struct ldap_context *context;
@@ -197,7 +197,7 @@ static switch_status mod_ldap_next_pair(switch_directory_handle *dh, char **var,
}
static const switch_directory_interface ldap_directory_interface = {
static const switch_directory_interface_t ldap_directory_interface = {
/*.interface_name */ "ldap",
/*.directory_open*/ mod_ldap_open,
/*.directory_close*/ mod_ldap_close,
@@ -207,7 +207,7 @@ static const switch_directory_interface ldap_directory_interface = {
};
static switch_loadable_module_interface skel_module_interface = {
static switch_loadable_module_interface_t skel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -220,7 +220,7 @@ static switch_loadable_module_interface skel_module_interface = {
/*.directory_interface */ &ldap_directory_interface
};
switch_status switch_module_load(const switch_loadable_module_interface **interface, char *filename)
switch_status_t switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &skel_module_interface;
+39 -39
View File
@@ -104,7 +104,7 @@ struct private_object {
switch_caller_profile_t *caller_profile;
unsigned short samprate;
switch_mutex_t *mutex;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
unsigned int num_codecs;
int codec_index;
switch_rtp_t *rtp_session;
@@ -149,21 +149,21 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string)
static switch_status channel_on_init(switch_core_session_t *session);
static switch_status channel_on_hangup(switch_core_session_t *session);
static switch_status channel_on_ring(switch_core_session_t *session);
static switch_status channel_on_loopback(switch_core_session_t *session);
static switch_status channel_on_transmit(switch_core_session_t *session);
static switch_status channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t channel_on_init(switch_core_session_t *session);
static switch_status_t channel_on_hangup(switch_core_session_t *session);
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsession, ldl_signal_t signal, char *msg);
static ldl_status handle_response(ldl_handle_t *handle, char *id);
static switch_status load_config(void);
static switch_status_t load_config(void);
static void dl_logger(char *file, const char *func, int line, int level, char *fmt, ...)
{
@@ -548,7 +548,7 @@ static void negotiate_thread_launch(switch_core_session_t *session)
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
*/
static switch_status channel_on_init(switch_core_session_t *session)
static switch_status_t channel_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@@ -567,7 +567,7 @@ static switch_status channel_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_ring(switch_core_session_t *session)
static switch_status_t channel_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -583,7 +583,7 @@ static switch_status channel_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_execute(switch_core_session_t *session)
static switch_status_t channel_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@@ -601,7 +601,7 @@ static switch_status channel_on_execute(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_hangup(switch_core_session_t *session)
static switch_status_t channel_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -640,7 +640,7 @@ static switch_status channel_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -664,19 +664,19 @@ static switch_status channel_kill_channel(switch_core_session_t *session, int si
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_loopback(switch_core_session_t *session)
static switch_status_t channel_on_loopback(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL LOOPBACK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_transmit(switch_core_session_t *session)
static switch_status_t channel_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -686,7 +686,7 @@ static switch_status channel_waitfor_read(switch_core_session_t *session, int ms
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -697,7 +697,7 @@ static switch_status channel_waitfor_write(switch_core_session_t *session, int m
}
static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtmf)
static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf)
{
struct private_object *tech_pvt = NULL;
//char *digit;
@@ -709,15 +709,15 @@ static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtm
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt = NULL;
uint32_t bytes = 0;
switch_size_t samples = 0, frames = 0, ms = 0;
switch_channel_t *channel = NULL;
switch_payload_t payload = 0;
switch_status status;
switch_status_t status;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -806,12 +806,12 @@ static switch_status channel_read_frame(switch_core_session_t *session, switch_f
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
int bytes = 0, samples = 0, frames = 0;
@@ -914,7 +914,7 @@ static switch_status channel_write_frame(switch_core_session_t *session, switch_
return status;
}
static switch_status channel_answer_channel(switch_core_session_t *session)
static switch_status_t channel_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -934,7 +934,7 @@ static switch_status channel_answer_channel(switch_core_session_t *session)
}
static switch_status channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
static switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
{
switch_channel_t *channel;
struct private_object *tech_pvt;
@@ -975,7 +975,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
/*.on_transmit */ channel_on_transmit
};
static const switch_io_routines channel_io_routines = {
static const switch_io_routines_t channel_io_routines = {
/*.outgoing_channel */ channel_outgoing_channel,
/*.answer_channel */ channel_answer_channel,
/*.read_frame */ channel_read_frame,
@@ -987,7 +987,7 @@ static const switch_io_routines channel_io_routines = {
/*.receive_message*/ channel_receive_message
};
static const switch_endpoint_interface channel_endpoint_interface = {
static const switch_endpoint_interface_t channel_endpoint_interface = {
/*.interface_name */ "dingaling",
/*.io_routines */ &channel_io_routines,
/*.event_handlers */ &channel_event_handlers,
@@ -995,7 +995,7 @@ static const switch_endpoint_interface channel_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface channel_module_interface = {
static const switch_loadable_module_interface_t channel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &channel_endpoint_interface,
/*.timer_interface */ NULL,
@@ -1008,7 +1008,7 @@ static const switch_loadable_module_interface channel_module_interface = {
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
@@ -1105,7 +1105,7 @@ static switch_status channel_outgoing_channel(switch_core_session_t *session, sw
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
@@ -1161,7 +1161,7 @@ static void init_profile(struct mdl_profile *profile)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (globals.running) {
int x = 0;
@@ -1179,7 +1179,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
}
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
char *var, *val;
@@ -1506,7 +1506,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
case LDL_SIGNAL_ERROR:
case LDL_SIGNAL_TERMINATE:
if (channel) {
switch_channel_state state = switch_channel_get_state(channel);
switch_channel_state_t state = switch_channel_get_state(channel);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "hungup %s %u %d\n", switch_channel_get_name(channel), state, CS_INIT);
switch_set_flag(tech_pvt, TFLAG_BYE);
switch_clear_flag(tech_pvt, TFLAG_IO);
+43 -43
View File
@@ -145,20 +145,20 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_rtpip, globals.rtpip)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_sipip, globals.sipip)
static switch_status exosip_on_init(switch_core_session_t *session);
static switch_status exosip_on_hangup(switch_core_session_t *session);
static switch_status exosip_on_loopback(switch_core_session_t *session);
static switch_status exosip_on_transmit(switch_core_session_t *session);
static switch_status exosip_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t exosip_on_init(switch_core_session_t *session);
static switch_status_t exosip_on_hangup(switch_core_session_t *session);
static switch_status_t exosip_on_loopback(switch_core_session_t *session);
static switch_status_t exosip_on_transmit(switch_core_session_t *session);
static switch_status_t exosip_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static int config_exosip(int reload);
static switch_status parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload);
static switch_status exosip_kill_channel(switch_core_session_t *session, int sig);
static switch_status activate_rtp(struct private_object *tech_pvt);
static switch_status_t parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload);
static switch_status_t exosip_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t activate_rtp(struct private_object *tech_pvt);
static void deactivate_rtp(struct private_object *tech_pvt);
static void sdp_add_rfc2833(struct osip_rfc3264 *cnf, int rate);
@@ -173,7 +173,7 @@ static struct private_object *get_pvt_by_call_id(int id)
return tech_pvt;
}
static switch_status exosip_on_execute(switch_core_session_t *session)
static switch_status_t exosip_on_execute(switch_core_session_t *session)
{
return SWITCH_STATUS_SUCCESS;
}
@@ -223,7 +223,7 @@ State methods they get called when the state changes to the specific state
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
*/
static switch_status exosip_on_init(switch_core_session_t *session)
static switch_status_t exosip_on_init(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -244,7 +244,7 @@ static switch_status exosip_on_init(switch_core_session_t *session)
char *dest_uri;
char *ip, *err;
switch_port_t sdp_port;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
int num_codecs = 0;
/* do SIP Goodies... */
@@ -382,7 +382,7 @@ static switch_status exosip_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_ring(switch_core_session_t *session)
static switch_status_t exosip_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -398,7 +398,7 @@ static switch_status exosip_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_hangup(switch_core_session_t *session)
static switch_status_t exosip_on_hangup(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -427,13 +427,13 @@ static switch_status exosip_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_loopback(switch_core_session_t *session)
static switch_status_t exosip_on_loopback(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXOSIP LOOPBACK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_transmit(switch_core_session_t *session)
static switch_status_t exosip_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXOSIP TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
@@ -459,7 +459,7 @@ static void deactivate_rtp(struct private_object *tech_pvt)
}
}
static switch_status activate_rtp(struct private_object *tech_pvt)
static switch_status_t activate_rtp(struct private_object *tech_pvt)
{
int bw, ms;
switch_channel_t *channel;
@@ -537,7 +537,7 @@ static switch_status activate_rtp(struct private_object *tech_pvt)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_answer_channel(switch_core_session_t *session)
static switch_status_t exosip_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -571,8 +571,8 @@ static switch_status exosip_answer_channel(switch_core_session_t *session)
}
static switch_status exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt = NULL;
size_t bytes = 0, samples = 0, frames = 0, ms = 0;
@@ -607,7 +607,7 @@ static switch_status exosip_read_frame(switch_core_session_t *session, switch_fr
}
if (switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_status status;
switch_status_t status;
if (!switch_test_flag(tech_pvt, TFLAG_RTP)) {
return SWITCH_STATUS_GENERR;
@@ -699,12 +699,12 @@ static switch_status exosip_read_frame(switch_core_session_t *session, switch_fr
}
static switch_status exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
int bytes = 0, samples = 0, frames = 0;
channel = switch_core_session_get_channel(session);
@@ -811,7 +811,7 @@ static switch_status exosip_write_frame(switch_core_session_t *session, switch_f
static switch_status exosip_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t exosip_kill_channel(switch_core_session_t *session, int sig)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -833,7 +833,7 @@ static switch_status exosip_kill_channel(switch_core_session_t *session, int sig
}
static switch_status exosip_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t exosip_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -848,7 +848,7 @@ static switch_status exosip_waitfor_read(switch_core_session_t *session, int ms,
}
static switch_status exosip_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t exosip_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -863,7 +863,7 @@ static switch_status exosip_waitfor_write(switch_core_session_t *session, int ms
}
static switch_status exosip_send_dtmf(switch_core_session_t *session, char *digits)
static switch_status_t exosip_send_dtmf(switch_core_session_t *session, char *digits)
{
struct private_object *tech_pvt;
char *c;
@@ -891,7 +891,7 @@ static switch_status exosip_send_dtmf(switch_core_session_t *session, char *digi
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
static switch_status_t exosip_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
{
switch_channel_t *channel;
struct private_object *tech_pvt;
@@ -957,7 +957,7 @@ static switch_status exosip_receive_message(switch_core_session_t *session, swit
return SWITCH_STATUS_SUCCESS;
}
static const switch_io_routines exosip_io_routines = {
static const switch_io_routines_t exosip_io_routines = {
/*.outgoing_channel */ exosip_outgoing_channel,
/*.answer_channel */ exosip_answer_channel,
/*.read_frame */ exosip_read_frame,
@@ -978,7 +978,7 @@ static const switch_state_handler_table_t exosip_event_handlers = {
/*.on_transmit */ exosip_on_transmit
};
static const switch_endpoint_interface exosip_endpoint_interface = {
static const switch_endpoint_interface_t exosip_endpoint_interface = {
/*.interface_name */ "exosip",
/*.io_routines */ &exosip_io_routines,
/*.event_handlers */ &exosip_event_handlers,
@@ -986,7 +986,7 @@ static const switch_endpoint_interface exosip_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface exosip_module_interface = {
static const switch_loadable_module_interface_t exosip_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &exosip_endpoint_interface,
/*.timer_interface */ NULL,
@@ -995,7 +995,7 @@ static const switch_loadable_module_interface exosip_module_interface = {
/*.application_interface */ NULL
};
static switch_status exosip_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t exosip_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&exosip_endpoint_interface, pool)) != 0) {
@@ -1060,7 +1060,7 @@ static switch_status exosip_outgoing_channel(switch_core_session_t *session, swi
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (globals.running) {
globals.running = -1;
@@ -1071,7 +1071,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* NOTE: **interface is **_interface because the common lib redefines interface to struct in some situations */
@@ -1111,7 +1111,7 @@ static void sdp_add_rfc2833(struct osip_rfc3264 *cnf, int rate)
}
static switch_status exosip_create_call(eXosip_event_t * event)
static switch_status_t exosip_create_call(eXosip_event_t * event)
{
switch_core_session_t *session;
sdp_message_t *remote_sdp = NULL;
@@ -1126,7 +1126,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
if ((session = switch_core_session_request(&exosip_endpoint_interface, NULL)) != 0) {
struct private_object *tech_pvt;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
int num_codecs = 0;
switch_port_t sdp_port;
char *ip, *err;
@@ -1434,12 +1434,12 @@ static void destroy_call_by_event(eXosip_event_t *event)
}
static switch_status parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload)
static switch_status_t parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload)
{
int pos = 0;
sdp_attribute_t *attr = NULL;
char *name, *rate, *payload;
switch_status status = SWITCH_STATUS_GENERR;
switch_status_t status = SWITCH_STATUS_GENERR;
while (osip_list_eol(media->a_attributes, pos) == 0) {
attr = (sdp_attribute_t *) osip_list_get(media->a_attributes, pos);
@@ -1805,7 +1805,7 @@ static int config_exosip(int reload)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
eXosip_event_t *event = NULL;
switch_event_t *s_event;
+36 -36
View File
@@ -204,7 +204,7 @@ typedef enum {
IAX_QUERY = 2
} iax_io_t;
static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_session *iax_session,
static switch_status_t iax_set_codec(struct private_object *tech_pvt, struct iax_session *iax_session,
unsigned int *format, unsigned int *cababilities, unsigned short *samprate,
iax_io_t io)
{
@@ -212,7 +212,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
//int rate = 8000;
//int codec_ms = 20;
switch_channel_t *channel;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
int num_codecs = 0;
unsigned int local_cap = 0, mixed_cap = 0, chosen = 0, leading = 0;
int x, srate = 8000;
@@ -390,18 +390,18 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_init(switch_core_session_t *session);
static switch_status channel_on_hangup(switch_core_session_t *session);
static switch_status channel_on_ring(switch_core_session_t *session);
static switch_status channel_on_loopback(switch_core_session_t *session);
static switch_status channel_on_transmit(switch_core_session_t *session);
static switch_status channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t channel_on_init(switch_core_session_t *session);
static switch_status_t channel_on_hangup(switch_core_session_t *session);
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
static void iax_err_cb(const char *s)
@@ -422,7 +422,7 @@ State methods they get called when the state changes to the specific state
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
*/
static switch_status channel_on_init(switch_core_session_t *session)
static switch_status_t channel_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@@ -449,7 +449,7 @@ static switch_status channel_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_ring(switch_core_session_t *session)
static switch_status_t channel_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -465,7 +465,7 @@ static switch_status channel_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_execute(switch_core_session_t *session)
static switch_status_t channel_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@@ -483,7 +483,7 @@ static switch_status channel_on_execute(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_hangup(switch_core_session_t *session)
static switch_status_t channel_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -519,7 +519,7 @@ static switch_status channel_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -541,19 +541,19 @@ static switch_status channel_kill_channel(switch_core_session_t *session, int si
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_loopback(switch_core_session_t *session)
static switch_status_t channel_on_loopback(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL LOOPBACK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_transmit(switch_core_session_t *session)
static switch_status_t channel_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -563,7 +563,7 @@ static switch_status channel_waitfor_read(switch_core_session_t *session, int ms
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -574,7 +574,7 @@ static switch_status channel_waitfor_write(switch_core_session_t *session, int m
}
static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtmf)
static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf)
{
struct private_object *tech_pvt = NULL;
char *digit;
@@ -590,8 +590,8 @@ static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtm
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -636,8 +636,8 @@ static switch_status channel_read_frame(switch_core_session_t *session, switch_f
return SWITCH_STATUS_FALSE;
}
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -665,7 +665,7 @@ static switch_status channel_write_frame(switch_core_session_t *session, switch_
}
static switch_status channel_answer_channel(switch_core_session_t *session)
static switch_status_t channel_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -691,7 +691,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
/*.on_transmit */ channel_on_transmit
};
static const switch_io_routines channel_io_routines = {
static const switch_io_routines_t channel_io_routines = {
/*.outgoing_channel */ channel_outgoing_channel,
/*.answer_channel */ channel_answer_channel,
/*.read_frame */ channel_read_frame,
@@ -702,7 +702,7 @@ static const switch_io_routines channel_io_routines = {
/*.send_dtmf */ channel_send_dtmf
};
static const switch_endpoint_interface channel_endpoint_interface = {
static const switch_endpoint_interface_t channel_endpoint_interface = {
/*.interface_name */ "iax",
/*.io_routines */ &channel_io_routines,
/*.event_handlers */ &channel_event_handlers,
@@ -710,7 +710,7 @@ static const switch_endpoint_interface channel_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface channel_module_interface = {
static const switch_loadable_module_interface_t channel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &channel_endpoint_interface,
/*.timer_interface */ NULL,
@@ -723,7 +723,7 @@ static const switch_loadable_module_interface channel_module_interface = {
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
@@ -790,7 +790,7 @@ static switch_status channel_outgoing_channel(switch_core_session_t *session, sw
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
@@ -815,7 +815,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
#define REGISTERED 1
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
char *var, *val;
@@ -867,7 +867,7 @@ static switch_status load_config(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
//int refresh;
struct iax_event *iaxevent = NULL;
@@ -1115,7 +1115,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
int x = 0;
+55 -55
View File
@@ -98,35 +98,35 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num)
static switch_status channel_on_init(switch_core_session_t *session);
static switch_status channel_on_hangup(switch_core_session_t *session);
static switch_status channel_on_ring(switch_core_session_t *session);
static switch_status channel_on_loopback(switch_core_session_t *session);
static switch_status channel_on_transmit(switch_core_session_t *session);
static switch_status channel_outgoing_channel(switch_core_session_t *session,
static switch_status_t channel_on_init(switch_core_session_t *session);
static switch_status_t channel_on_hangup(switch_core_session_t *session);
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status engage_device(struct private_object *tech_pvt);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t engage_device(struct private_object *tech_pvt);
static int dump_info(void);
static switch_status load_config(void);
static switch_status_t load_config(void);
static int get_dev_by_name(char *name, int in);
static switch_status place_call(char *dest, char *out, size_t outlen);
static switch_status hup_call(char *callid, char *out, size_t outlen);
static switch_status call_info(char *callid, char *out, size_t outlen);
static switch_status send_dtmf(char *callid, char *out, size_t outlen);
static switch_status answer_call(char *callid, char *out, size_t outlen);
static switch_status_t place_call(char *dest, char *out, size_t outlen);
static switch_status_t hup_call(char *callid, char *out, size_t outlen);
static switch_status_t call_info(char *callid, char *out, size_t outlen);
static switch_status_t send_dtmf(char *callid, char *out, size_t outlen);
static switch_status_t answer_call(char *callid, char *out, size_t outlen);
/*
State methods they get called when the state changes to the specific state
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
*/
static switch_status channel_on_init(switch_core_session_t *session)
static switch_status_t channel_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@@ -148,7 +148,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_ring(switch_core_session_t *session)
static switch_status_t channel_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -164,7 +164,7 @@ static switch_status channel_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_execute(switch_core_session_t *session)
static switch_status_t channel_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@@ -196,7 +196,7 @@ static void deactivate_audio_device(struct private_object *tech_pvt)
switch_mutex_unlock(globals.device_lock);
}
static switch_status channel_on_hangup(switch_core_session_t *session)
static switch_status_t channel_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -220,7 +220,7 @@ static switch_status channel_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -241,13 +241,13 @@ static switch_status channel_kill_channel(switch_core_session_t *session, int si
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_loopback(switch_core_session_t *session)
static switch_status_t channel_on_loopback(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL LOOPBACK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_transmit(switch_core_session_t *session)
static switch_status_t channel_on_transmit(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -291,7 +291,7 @@ static switch_status channel_on_transmit(switch_core_session_t *session)
}
static switch_status channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -301,7 +301,7 @@ static switch_status channel_waitfor_read(switch_core_session_t *session, int ms
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -312,7 +312,7 @@ static switch_status channel_waitfor_write(switch_core_session_t *session, int m
}
static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtmf)
static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf)
{
struct private_object *tech_pvt = NULL;
@@ -324,13 +324,13 @@ static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtm
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
int samples;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -358,12 +358,12 @@ static switch_status channel_read_frame(switch_core_session_t *session, switch_f
return status;
}
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -384,7 +384,7 @@ static switch_status channel_write_frame(switch_core_session_t *session, switch_
}
static switch_status channel_answer_channel(switch_core_session_t *session)
static switch_status_t channel_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -399,35 +399,35 @@ static switch_status channel_answer_channel(switch_core_session_t *session)
}
static struct switch_api_interface send_dtmf_interface = {
static switch_api_interface_t send_dtmf_interface = {
/*.interface_name */ "padtmf",
/*.desc */ "PortAudio Dial DTMF",
/*.function */ send_dtmf,
/*.next */ NULL
};
static struct switch_api_interface answer_call_interface = {
static switch_api_interface_t answer_call_interface = {
/*.interface_name */ "paoffhook",
/*.desc */ "PortAudio Answer Call",
/*.function */ answer_call,
/*.next */ &send_dtmf_interface
};
static struct switch_api_interface channel_info_interface = {
static switch_api_interface_t channel_info_interface = {
/*.interface_name */ "painfo",
/*.desc */ "PortAudio Call Info",
/*.function */ call_info,
/*.next */ &answer_call_interface
};
static struct switch_api_interface channel_hup_interface = {
static switch_api_interface_t channel_hup_interface = {
/*.interface_name */ "pahup",
/*.desc */ "PortAudio Hangup Call",
/*.function */ hup_call,
/*.next */ &channel_info_interface
};
static struct switch_api_interface channel_api_interface = {
static switch_api_interface_t channel_api_interface = {
/*.interface_name */ "pacall",
/*.desc */ "PortAudio Call",
/*.function */ place_call,
@@ -443,7 +443,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
/*.on_transmit */ channel_on_transmit
};
static const switch_io_routines channel_io_routines = {
static const switch_io_routines_t channel_io_routines = {
/*.outgoing_channel */ channel_outgoing_channel,
/*.answer_channel */ channel_answer_channel,
/*.read_frame */ channel_read_frame,
@@ -454,7 +454,7 @@ static const switch_io_routines channel_io_routines = {
/*.send_dtmf */ channel_send_dtmf
};
static const switch_endpoint_interface channel_endpoint_interface = {
static const switch_endpoint_interface_t channel_endpoint_interface = {
/*.interface_name */ "portaudio",
/*.io_routines */ &channel_io_routines,
/*.event_handlers */ &channel_event_handlers,
@@ -462,7 +462,7 @@ static const switch_endpoint_interface channel_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface channel_module_interface = {
static const switch_loadable_module_interface_t channel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &channel_endpoint_interface,
/*.timer_interface */ NULL,
@@ -475,7 +475,7 @@ static const switch_loadable_module_interface channel_module_interface = {
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
@@ -523,7 +523,7 @@ static switch_status channel_outgoing_channel(switch_core_session_t *session, sw
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
@@ -552,7 +552,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
char *var, *val;
@@ -607,7 +607,7 @@ static switch_status load_config(void)
}
/*
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
switch_yield(50000);
@@ -616,7 +616,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
}
*/
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
Pa_Terminate();
@@ -710,7 +710,7 @@ static int dump_info(void)
return err;
}
static switch_status engage_device(struct private_object *tech_pvt)
static switch_status_t engage_device(struct private_object *tech_pvt)
{
int sample_rate = globals.sample_rate;
int codec_ms = 20;
@@ -780,10 +780,10 @@ static switch_status engage_device(struct private_object *tech_pvt)
return SWITCH_STATUS_FALSE;
}
static switch_status place_call(char *dest, char *out, size_t outlen)
static switch_status_t place_call(char *dest, char *out, size_t outlen)
{
switch_core_session_t *session;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
if (!dest) {
strncpy(out, "Usage: pacall <exten>", outlen - 1);
@@ -831,7 +831,7 @@ static switch_status place_call(char *dest, char *out, size_t outlen)
}
static switch_status hup_call(char *callid, char *out, size_t outlen)
static switch_status_t hup_call(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@@ -875,7 +875,7 @@ static switch_status hup_call(char *callid, char *out, size_t outlen)
}
static switch_status send_dtmf(char *callid, char *out, size_t outlen)
static switch_status_t send_dtmf(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt = NULL;
switch_channel_t *channel = NULL;
@@ -899,7 +899,7 @@ static switch_status send_dtmf(char *callid, char *out, size_t outlen)
return SWITCH_STATUS_SUCCESS;
}
static switch_status answer_call(char *callid, char *out, size_t outlen)
static switch_status_t answer_call(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt = NULL;
switch_channel_t *channel = NULL;
@@ -931,7 +931,7 @@ static void print_info(struct private_object *tech_pvt, char *out, size_t outlen
}
static switch_status call_info(char *callid, char *out, size_t outlen)
static switch_status_t call_info(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt;
switch_hash_index_t *hi;
+31 -31
View File
@@ -163,18 +163,18 @@ typedef struct woomera_event_queue woomera_event_queue;
static woomera_profile default_profile;
static switch_status woomerachan_on_init(switch_core_session_t *session);
static switch_status woomerachan_on_hangup(switch_core_session_t *session);
static switch_status woomerachan_on_ring(switch_core_session_t *session);
static switch_status woomerachan_on_loopback(switch_core_session_t *session);
static switch_status woomerachan_on_transmit(switch_core_session_t *session);
static switch_status woomerachan_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t woomerachan_on_init(switch_core_session_t *session);
static switch_status_t woomerachan_on_hangup(switch_core_session_t *session);
static switch_status_t woomerachan_on_ring(switch_core_session_t *session);
static switch_status_t woomerachan_on_loopback(switch_core_session_t *session);
static switch_status_t woomerachan_on_transmit(switch_core_session_t *session);
static switch_status_t woomerachan_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status woomerachan_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t woomerachan_kill_channel(switch_core_session_t *session, int sig);
static void tech_destroy(private_object * tech_pvt);
static void woomera_printf(woomera_profile * profile, switch_socket_t *socket, char *fmt, ...);
static char *woomera_message_header(woomera_message * wmsg, char *key);
@@ -195,7 +195,7 @@ static int tech_activate(private_object * tech_pvt);
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
*/
static switch_status woomerachan_on_init(switch_core_session_t *session)
static switch_status_t woomerachan_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@@ -239,7 +239,7 @@ static switch_status woomerachan_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_ring(switch_core_session_t *session)
static switch_status_t woomerachan_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -255,7 +255,7 @@ static switch_status woomerachan_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_execute(switch_core_session_t *session)
static switch_status_t woomerachan_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@@ -273,7 +273,7 @@ static switch_status woomerachan_on_execute(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_hangup(switch_core_session_t *session)
static switch_status_t woomerachan_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -311,7 +311,7 @@ static void udp_socket_close(struct private_object *tech_pvt)
}
static switch_status woomerachan_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t woomerachan_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -336,19 +336,19 @@ static switch_status woomerachan_kill_channel(switch_core_session_t *session, in
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_loopback(switch_core_session_t *session)
static switch_status_t woomerachan_on_loopback(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WOOMERACHAN LOOPBACK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_transmit(switch_core_session_t *session)
static switch_status_t woomerachan_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WOOMERACHAN TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t woomerachan_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -358,7 +358,7 @@ static switch_status woomerachan_waitfor_read(switch_core_session_t *session, in
return switch_socket_waitfor(&tech_pvt->read_poll, ms) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t woomerachan_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@@ -369,8 +369,8 @@ static switch_status woomerachan_waitfor_write(switch_core_session_t *session, i
// return switch_socket_waitfor(&tech_pvt->write_poll, ms);
}
static switch_status woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -404,8 +404,8 @@ static switch_status woomerachan_read_frame(switch_core_session_t *session, swit
return SWITCH_STATUS_FALSE;
}
static switch_status woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@@ -441,7 +441,7 @@ static const switch_state_handler_table_t woomerachan_event_handlers = {
/*.on_transmit */ woomerachan_on_transmit
};
static const switch_io_routines woomerachan_io_routines = {
static const switch_io_routines_t woomerachan_io_routines = {
/*.outgoing_channel */ woomerachan_outgoing_channel,
/*.answer_channel */ NULL,
/*.read_frame */ woomerachan_read_frame,
@@ -451,7 +451,7 @@ static const switch_io_routines woomerachan_io_routines = {
/*.waitfor_write */ woomerachan_waitfor_write
};
static const switch_endpoint_interface woomerachan_endpoint_interface = {
static const switch_endpoint_interface_t woomerachan_endpoint_interface = {
/*.interface_name */ "woomera",
/*.io_routines */ &woomerachan_io_routines,
/*.event_handlers */ &woomerachan_event_handlers,
@@ -459,7 +459,7 @@ static const switch_endpoint_interface woomerachan_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface woomerachan_module_interface = {
static const switch_loadable_module_interface_t woomerachan_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &woomerachan_endpoint_interface,
/*.timer_interface */ NULL,
@@ -472,7 +472,7 @@ static const switch_loadable_module_interface woomerachan_module_interface = {
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status woomerachan_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t woomerachan_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&woomerachan_endpoint_interface, pool)) != 0) {
@@ -1276,7 +1276,7 @@ static void *woomera_thread_run(void *obj)
return NULL;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
woomera_thread_run(&default_profile);
@@ -1284,7 +1284,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
return SWITCH_STATUS_TERM;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
int x = 0;
woomera_profile_thread_running(&default_profile, 1, 0);
@@ -1298,7 +1298,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
switch_config_t cfg;
@@ -48,10 +48,10 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address)
#define MULTICAST_EVENT "multicast::event"
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
char *var, *val;
char *cf = "event_multicast.conf";
@@ -105,7 +105,7 @@ static void event_handler(switch_event_t *event)
}
static switch_loadable_module_interface event_test_module_interface = {
static switch_loadable_module_interface_t event_test_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -115,7 +115,7 @@ static switch_loadable_module_interface event_test_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
memset(&globals, 0, sizeof(globals));
@@ -173,7 +173,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
int x = 0;
@@ -187,7 +187,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
switch_event_t *local_event;
char buf[1024];
@@ -52,7 +52,7 @@ static void event_handler(switch_event_t *event)
static switch_loadable_module_interface event_test_module_interface = {
static switch_loadable_module_interface_t event_test_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -96,7 +96,7 @@ static void *torture_thread(switch_thread_t *thread, void *obj)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Thread Ended\n");
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
THREADS = -1;
switch_yield(100000);
@@ -105,7 +105,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
#endif
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &event_test_module_interface;
@@ -95,10 +95,10 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_jid, globals.jid)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_passwd, globals.passwd)
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
char *var, *val;
char *cf = "xmpp_event.conf";
int count = 0;
@@ -346,7 +346,7 @@ static void xmpp_connect(char *jabber_id, char *pass)
}
static switch_loadable_module_interface xmpp_event_module_interface = {
static switch_loadable_module_interface_t xmpp_event_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -355,7 +355,7 @@ static switch_loadable_module_interface xmpp_event_module_interface = {
/*.application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &xmpp_event_module_interface;
@@ -369,7 +369,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (RUNNING) {
@@ -382,7 +382,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
RUNNING = 1;
xmpp_connect(globals.jid, globals.passwd);
@@ -191,10 +191,10 @@ static void event_handler(switch_event_t *event)
}
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
char *var, *val;
char *cf = "zeroconf.conf";
int count = 0;
@@ -240,7 +240,7 @@ static switch_status load_config(void)
}
static switch_loadable_module_interface zeroconf_module_interface = {
static switch_loadable_module_interface_t zeroconf_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -254,7 +254,7 @@ static switch_loadable_module_interface zeroconf_module_interface = {
static int RUNNING = 0;
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (RUNNING == 1) {
RUNNING = -1;
@@ -264,7 +264,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
memset(&globals, 0, sizeof(globals));
@@ -303,7 +303,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
RUNNING = 1;
+9 -9
View File
@@ -41,7 +41,7 @@ struct sndfile_context {
typedef struct sndfile_context sndfile_context;
static switch_status sndfile_file_open(switch_file_handle_t *handle, char *path)
static switch_status_t sndfile_file_open(switch_file_handle_t *handle, char *path)
{
sndfile_context *context;
int mode = 0;
@@ -144,7 +144,7 @@ static switch_status sndfile_file_open(switch_file_handle_t *handle, char *path)
return SWITCH_STATUS_SUCCESS;
}
static switch_status sndfile_file_close(switch_file_handle_t *handle)
static switch_status_t sndfile_file_close(switch_file_handle_t *handle)
{
sndfile_context *context = handle->private_info;
@@ -153,7 +153,7 @@ static switch_status sndfile_file_close(switch_file_handle_t *handle)
return SWITCH_STATUS_SUCCESS;
}
static switch_status sndfile_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
static switch_status_t sndfile_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
{
sndfile_context *context = handle->private_info;
@@ -169,7 +169,7 @@ static switch_status sndfile_file_seek(switch_file_handle_t *handle, unsigned in
}
static switch_status sndfile_file_read(switch_file_handle_t *handle, void *data, size_t *len)
static switch_status_t sndfile_file_read(switch_file_handle_t *handle, void *data, size_t *len)
{
size_t inlen = *len;
sndfile_context *context = handle->private_info;
@@ -191,7 +191,7 @@ static switch_status sndfile_file_read(switch_file_handle_t *handle, void *data,
return SWITCH_STATUS_SUCCESS;
}
static switch_status sndfile_file_write(switch_file_handle_t *handle, void *data, size_t *len)
static switch_status_t sndfile_file_write(switch_file_handle_t *handle, void *data, size_t *len)
{
size_t inlen = *len;
sndfile_context *context = handle->private_info;
@@ -217,7 +217,7 @@ static switch_status sndfile_file_write(switch_file_handle_t *handle, void *data
static char **supported_formats;
static switch_file_interface sndfile_file_interface = {
static switch_file_interface_t sndfile_file_interface = {
/*.interface_name */ modname,
/*.file_open */ sndfile_file_open,
/*.file_close */ sndfile_file_close,
@@ -228,7 +228,7 @@ static switch_file_interface sndfile_file_interface = {
/*.next */ NULL,
};
static switch_loadable_module_interface sndfile_module_interface = {
static switch_loadable_module_interface_t sndfile_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -239,7 +239,7 @@ static switch_loadable_module_interface sndfile_module_interface = {
/*.file_interface */ &sndfile_file_interface
};
static switch_status setup_formats(void)
static switch_status_t setup_formats(void)
{
SF_FORMAT_INFO info;
SF_INFO sfinfo;
@@ -309,7 +309,7 @@ static switch_status setup_formats(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
+4 -4
View File
@@ -80,12 +80,12 @@ static void perl_function(switch_core_session_t *session, char *data)
destroy_perl(&my_perl);
}
static const switch_application_interface perl_application_interface = {
static const switch_application_interface_t perl_application_interface = {
/*.interface_name */ "perl",
/*.application_function */ perl_function
};
static switch_loadable_module_interface perl_module_interface = {
static switch_loadable_module_interface_t perl_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -99,7 +99,7 @@ static switch_loadable_module_interface perl_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (globals.my_perl) {
perl_destruct(globals.my_perl);
@@ -110,7 +110,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
PerlInterpreter *my_perl;
+4 -4
View File
@@ -17,7 +17,7 @@ void fs_core_set_globals(void)
int fs_core_init(char *path)
{
switch_status status;
switch_status_t status;
if (switch_strlen_zero(path)) {
path = NULL;
@@ -30,7 +30,7 @@ int fs_core_init(char *path)
int fs_core_destroy(void)
{
switch_status status;
switch_status_t status;
status = switch_core_destroy();
@@ -102,7 +102,7 @@ void fs_channel_get_variable(switch_core_session_t *session, char *var)
void fs_channel_set_state(switch_core_session_t *session, char *state)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_channel_state fs_state = switch_channel_get_state(channel);
switch_channel_state_t fs_state = switch_channel_get_state(channel);
if (!strcmp(state, "EXECUTE")) {
fs_state = CS_EXECUTE;
@@ -115,7 +115,7 @@ void fs_channel_set_state(switch_core_session_t *session, char *state)
int fs_ivr_play_file(switch_core_session_t *session, char *file, char *timer_name)
{
switch_status status;
switch_status_t status;
if (switch_strlen_zero(timer_name)) {
timer_name = NULL;
}
@@ -157,7 +157,7 @@ static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
}
static switch_status init_js(void)
static switch_status_t init_js(void)
{
memset(&globals, 0, sizeof(globals));
globals.gQuitting = JS_FALSE;
@@ -175,7 +175,7 @@ static switch_status init_js(void)
return SWITCH_STATUS_SUCCESS;
}
static switch_status js_stream_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t js_stream_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
char code[2048];
struct dtmf_callback_state *cb_state = buf;
@@ -283,7 +283,7 @@ static switch_status js_stream_dtmf_callback(switch_core_session_t *session, cha
}
static switch_status js_record_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t js_record_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
char code[2048];
struct dtmf_callback_state *cb_state = buf;
@@ -344,7 +344,7 @@ static switch_status js_record_dtmf_callback(switch_core_session_t *session, cha
}
static switch_status js_speak_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t js_speak_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
char code[2048];
struct dtmf_callback_state *cb_state = buf;
@@ -397,7 +397,7 @@ static JSBool session_recordfile(JSContext *cx, JSObject *obj, uintN argc, jsval
char *dtmf_callback = NULL;
void *bp = NULL;
int len = 0;
switch_dtmf_callback_function dtmf_func = NULL;
switch_dtmf_callback_function_t dtmf_func = NULL;
struct dtmf_callback_state cb_state = {0};
switch_file_handle_t fh;
@@ -443,7 +443,7 @@ static JSBool session_streamfile(JSContext *cx, JSObject *obj, uintN argc, jsval
char *dtmf_callback = NULL;
void *bp = NULL;
int len = 0;
switch_dtmf_callback_function dtmf_func = NULL;
switch_dtmf_callback_function_t dtmf_func = NULL;
struct dtmf_callback_state cb_state = {0};
switch_file_handle_t fh;
@@ -499,7 +499,7 @@ static JSBool session_speak(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
void *bp = NULL;
int len = 0;
struct dtmf_callback_state cb_state = {0};
switch_dtmf_callback_function dtmf_func = NULL;
switch_dtmf_callback_function_t dtmf_func = NULL;
channel = switch_core_session_get_channel(jss->session);
assert(channel != NULL);
@@ -639,7 +639,7 @@ static JSBool session_execute(JSContext *cx, JSObject *obj, uintN argc, jsval *a
{
JSBool retval = JS_FALSE;
if (argc > 1) {
const switch_application_interface *application_interface;
const switch_application_interface_t *application_interface;
char *app_name = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
char *app_arg = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
struct js_session *jss = JS_GetPrivate(cx, obj);
@@ -1315,7 +1315,7 @@ static JSBool db_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv
char *sql = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
char *err = NULL;
void *arg = NULL;
switch_core_db_callback_func cb_func = NULL;
switch_core_db_callback_func_t cb_func = NULL;
if (argc > 1) {
@@ -2149,7 +2149,7 @@ static void js_thread_launch(char *text)
}
static switch_status launch_async(char *text, char *out, size_t outlen)
static switch_status_t launch_async(char *text, char *out, size_t outlen)
{
if (switch_strlen_zero(text)) {
@@ -2163,21 +2163,21 @@ static switch_status launch_async(char *text, char *out, size_t outlen)
}
static const switch_application_interface ivrtest_application_interface = {
static const switch_application_interface_t ivrtest_application_interface = {
/*.interface_name */ "javascript",
/*.application_function */ js_parse_and_execute,
NULL, NULL, NULL,
/*.next*/ NULL
};
static struct switch_api_interface js_run_interface = {
static switch_api_interface_t js_run_interface = {
/*.interface_name */ "jsrun",
/*.desc */ "run a script",
/*.function */ launch_async,
/*.next */ NULL
};
static switch_loadable_module_interface spidermonkey_module_interface = {
static switch_loadable_module_interface_t spidermonkey_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -2190,9 +2190,9 @@ static switch_loadable_module_interface spidermonkey_module_interface = {
/*.directory_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
switch_status status;
switch_status_t status;
if ((status = init_js()) != SWITCH_STATUS_SUCCESS) {
return status;
+7 -7
View File
@@ -34,7 +34,7 @@
static const char modname[] = "mod_console";
static const uint8_t STATIC_LEVELS[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
static switch_loadable_module_interface console_module_interface = {
static switch_loadable_module_interface_t console_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@@ -78,7 +78,7 @@ static void add_mapping(char *var, char *val)
switch_core_hash_insert(log_hash, name, (void *) &STATIC_LEVELS[(uint8_t)switch_log_str2level(val)]);
}
static switch_status config_logger(void)
static switch_status_t config_logger(void)
{
switch_config_t cfg;
char *var, *val;
@@ -101,13 +101,13 @@ static switch_status config_logger(void)
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_console_logger(const switch_log_node *node, switch_log_level level)
static switch_status_t switch_console_logger(const switch_log_node_t *node, switch_log_level_t level)
{
FILE *handle;
if ((handle = switch_core_data_channel(SWITCH_CHANNEL_ID_LOG))) {
uint8_t *lookup = NULL;
switch_log_level level = SWITCH_LOG_DEBUG;
switch_log_level_t level = SWITCH_LOG_DEBUG;
if (log_hash) {
lookup = switch_core_hash_find(log_hash, node->file);
@@ -118,9 +118,9 @@ static switch_status switch_console_logger(const switch_log_node *node, switch_l
}
if (lookup) {
level = (switch_log_level) *lookup;
level = (switch_log_level_t) *lookup;
} else if (all_level > -1) {
level = (switch_log_level) all_level;
level = (switch_log_level_t) all_level;
}
if (!log_hash || (((all_level > - 1) || lookup) && level >= node->level)) {
@@ -134,7 +134,7 @@ static switch_status switch_console_logger(const switch_log_node *node, switch_l
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
+6 -6
View File
@@ -48,7 +48,7 @@ struct timer_private {
#endif
};
static switch_status soft_timer_init(switch_timer_t *timer)
static switch_status_t soft_timer_init(switch_timer_t *timer)
{
struct timer_private *private;
@@ -65,7 +65,7 @@ static switch_status soft_timer_init(switch_timer_t *timer)
return SWITCH_STATUS_SUCCESS;
}
static switch_status soft_timer_next(switch_timer_t *timer)
static switch_status_t soft_timer_next(switch_timer_t *timer)
{
struct timer_private *private = timer->private_info;
@@ -91,20 +91,20 @@ static switch_status soft_timer_next(switch_timer_t *timer)
return SWITCH_STATUS_SUCCESS;
}
static switch_status soft_timer_destroy(switch_timer_t *timer)
static switch_status_t soft_timer_destroy(switch_timer_t *timer)
{
timer->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
static const switch_timer_interface soft_timer_interface = {
static const switch_timer_interface_t soft_timer_interface = {
/*.interface_name */ "soft",
/*.timer_init */ soft_timer_init,
/*.timer_next */ soft_timer_next,
/*.timer_destroy */ soft_timer_destroy
};
static const switch_loadable_module_interface mod_timers_module_interface = {
static const switch_loadable_module_interface_t mod_timers_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ &soft_timer_interface,
@@ -113,7 +113,7 @@ static const switch_loadable_module_interface mod_timers_module_interface = {
/*.switch_application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */