]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
commit
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 3 May 2006 16:55:30 +0000 (16:55 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 3 May 2006 16:55:30 +0000 (16:55 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1326 d0543943-73ff-0310-b7d9-9358b9ac24b2

modules.conf.in
src/mod/endpoints/mod_opal/mod_opal.c
src/mod/loggers/mod_syslog/mod_syslog.c
src/switch_loadable_module.c

index ea23d936c9d39261bd4e75f31e2af49275215c99..04c592b4dba2fa73d7f7ab60f546464478b68130 100644 (file)
@@ -1,11 +1,11 @@
 loggers/mod_console
-#loggers/mod_syslog
+loggers/mod_syslog
 applications/mod_commands
 applications/mod_bridgecall
 applications/mod_echo
-#applications/mod_ivrtest
+applications/mod_ivrtest
 applications/mod_playback
-#applications/mod_skel
+applications/mod_skel
 #asr_tts/mod_cepstral
 codecs/mod_g711
 codecs/mod_ilbc
@@ -20,17 +20,17 @@ dialplans/mod_pcre
 #directories/mod_ldap
 endpoints/mod_exosip
 endpoints/mod_iax
-#endpoints/mod_dingaling
-#endpoints/mod_opal
-#endpoints/mod_portaudio
-#endpoints/mod_wanpipe
-#endpoints/mod_woomera
+endpoints/mod_dingaling
+endpoints/mod_opal
+endpoints/mod_portaudio
+endpoints/mod_wanpipe
+endpoints/mod_woomera
 #event_handlers/mod_event_multicast
 #event_handlers/mod_event_test
-#event_handlers/mod_xmpp_event
+event_handlers/mod_xmpp_event
 #event_handlers/mod_zeroconf
 formats/mod_sndfile
-#languages/mod_perl
+languages/mod_perl
 #languages/mod_spidermonkey
 timers/mod_softtimer
 
index 50d69a5906142c3ac5819c21fcec7d7dc8a22532..32ca15818d8683eb6898f92f53c9664ade217d64 100644 (file)
@@ -34,7 +34,7 @@
 
 static const char modname[] = "mod_woomera";
 
-static switch_memory_pool *module_pool = NULL;
+static switch_memory_pool_t *module_pool = NULL;
 
 
 typedef enum {
@@ -53,25 +53,25 @@ struct private_object {
        unsigned int flags;
        struct switch_frame frame;
        unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
-       switch_core_session *session;
-       switch_caller_profile *caller_profile;
+       switch_core_session_t *session;
+       switch_caller_profile_t *caller_profile;
 };
 
 
-static const switch_endpoint_interface channel_endpoint_interface;
+static const switch_endpoint_interface_t channel_endpoint_interface;
 
-static switch_status channel_on_init(switch_core_session *session);
-static switch_status channel_on_hangup(switch_core_session *session);
-static switch_status channel_on_ring(switch_core_session *session);
-static switch_status channel_on_loopback(switch_core_session *session);
-static switch_status channel_on_transmit(switch_core_session *session);
-static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
-                                                                                         switch_core_session **new_session);
-static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
+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);
+static switch_status_t channel_read_frame(switch_core_session_t *session, struct switch_frame **frame, int timeout,
                                                                                switch_io_flag flags, int stream_id);
-static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
+static switch_status_t channel_write_frame(switch_core_session_t *session, struct switch_frame *frame, int timeout,
                                                                                 switch_io_flag flags, int stream_id);
-static switch_status channel_kill_channel(switch_core_session *session, int sig);
+static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
 
 
 /* 
@@ -79,9 +79,9 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
    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 *session)
+static switch_status_t channel_on_init(switch_core_session_t *session)
 {
-       switch_channel *channel;
+       switch_channel_t *channel;
        struct private_object *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
@@ -95,9 +95,9 @@ static switch_status channel_on_init(switch_core_session *session)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status channel_on_ring(switch_core_session *session)
+static switch_status_t channel_on_ring(switch_core_session_t *session)
 {
-       switch_channel *channel = NULL;
+       switch_channel_t *channel = NULL;
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
@@ -111,10 +111,10 @@ static switch_status channel_on_ring(switch_core_session *session)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status channel_on_execute(switch_core_session *session)
+static switch_status_t channel_on_execute(switch_core_session_t *session)
 {
 
-       switch_channel *channel = NULL;
+       switch_channel_t *channel = NULL;
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
@@ -129,9 +129,9 @@ static switch_status channel_on_execute(switch_core_session *session)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status channel_on_hangup(switch_core_session *session)
+static switch_status_t channel_on_hangup(switch_core_session_t *session)
 {
-       switch_channel *channel = NULL;
+       switch_channel_t *channel = NULL;
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
@@ -146,9 +146,9 @@ static switch_status channel_on_hangup(switch_core_session *session)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status channel_kill_channel(switch_core_session *session, int sig)
+static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
 {
-       switch_channel *channel = NULL;
+       switch_channel_t *channel = NULL;
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
@@ -164,13 +164,13 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status channel_on_loopback(switch_core_session *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 *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;
@@ -180,13 +180,13 @@ static switch_status channel_on_transmit(switch_core_session *session)
 /* 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 *session, switch_caller_profile *outbound_profile,
-                                                                                         switch_core_session **new_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)
 {
        if ((*new_session = switch_core_session_request(&channel_endpoint_interface, NULL))) {
                struct private_object *tech_pvt;
-               switch_channel *channel, *orig_channel;
-               switch_caller_profile *caller_profile, *originator_caller_profile = NULL;
+               switch_channel_t *channel, *orig_channel;
+               switch_caller_profile_t *caller_profile, *originator_caller_profile = NULL;
 
                switch_core_session_add_stream(*new_session, NULL);
                if ((tech_pvt =
@@ -216,7 +216,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
 
                /* (session == NULL) means it was originated from the core not from another channel */
                if (session && (orig_channel = switch_core_session_get_channel(session))) {
-                       switch_caller_profile *cloned_profile;
+                       switch_caller_profile_t *cloned_profile;
 
                        if ((originator_caller_profile = switch_channel_get_caller_profile(orig_channel))) {
                                cloned_profile = switch_caller_profile_clone(*new_session, originator_caller_profile);
@@ -234,7 +234,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
 
 }
 
-static switch_status channel_waitfor_read(switch_core_session *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;
 
@@ -244,7 +244,7 @@ static switch_status channel_waitfor_read(switch_core_session *session, int ms,
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status channel_waitfor_write(switch_core_session *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;
 
@@ -255,13 +255,13 @@ static switch_status channel_waitfor_write(switch_core_session *session, int ms,
 
 }
 
-static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
+static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame **frame, int timeout,
                                                                                switch_io_flag flags, int stream_id)
 {
-       switch_channel *channel = NULL;
+       switch_channel_t *channel = NULL;
        struct private_object *tech_pvt = NULL;
        //switch_frame *pframe;
-       //switch_status status;
+       //switch_status_t status;
 
        channel = switch_core_session_get_channel(session);
        assert(channel != NULL);
@@ -272,10 +272,10 @@ static switch_status channel_read_frame(switch_core_session *session, switch_fra
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
+static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame *frame, int timeout,
                                                                                 switch_io_flag flags, int stream_id)
 {
-       switch_channel *channel = NULL;
+       switch_channel_t *channel = NULL;
        struct private_object *tech_pvt = NULL;
        //switch_frame *pframe;
 
@@ -330,7 +330,7 @@ static const switch_loadable_module_interface channel_module_interface = {
 
 
 
-SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
+SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
 {
        int x = 0;
        opal_profile_thread_running(&default_profile, 1, 0);
@@ -345,7 +345,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 **interface, char *filename)
 {
 
        switch_config cfg;
@@ -387,7 +387,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)
 {
 
        return SWITCH_STATUS_TERM;
index dc6f8575c123bbab113d623d5ee103a0cf86479f..59758b873ed55ba5d19b0e3f0a97854fb4ee544e 100644 (file)
@@ -40,7 +40,7 @@
 #define MAX_LENGTH       1024
 
 static const char modname[] = "mod_syslog";
-static switch_status load_config(void);
+static switch_status_t load_config(void);
 
 static struct {
        char *ident;
@@ -54,7 +54,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_level, globals.level)
 SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_format, globals.format)
 SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility)
 
-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,
@@ -67,7 +67,7 @@ static switch_loadable_module_interface console_module_interface = {
        /*.directory_interface */ NULL
 };
 
-static switch_status mod_syslog_logger(const switch_log_node *node, switch_log_level level)
+static switch_status_t mod_syslog_logger(const switch_log_node_t *node, switch_log_level_t level)
 {
        char *message = NULL;
        char line_no[sizeof(int)*8+1];
@@ -103,7 +103,7 @@ static switch_status mod_syslog_logger(const switch_log_node *node, switch_log_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)
 {
        *interface = &console_module_interface;
 
@@ -116,16 +116,16 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
        return SWITCH_STATUS_SUCCESS;
 }
 
-SWITCH_MOD_DECLARE(switch_status) switch_module_unload(const switch_loadable_module_interface **interface)
+SWITCH_MOD_DECLARE(switch_status_t) switch_module_unload(const switch_loadable_module_interface_t **interface)
 {
        closelog();
        
        return SWITCH_STATUS_SUCCESS;
 }
 
-static switch_status load_config(void)
+static switch_status_t load_config(void)
 {
-       switch_config cfg;
+       switch_config_t cfg;
        char *var, *val;
        char *cf = "syslog.conf";
 
index 13acfed54eb4175de744d428807a553e3d166ffa..1faab1bf5726c5c68e6dcd5b740bfd855be7962b 100644 (file)
@@ -30,7 +30,7 @@
  *
  */
 #include <switch.h>
-
+#include <ctype.h>
 
 struct switch_loadable_module {
        char *filename;
@@ -568,7 +568,14 @@ SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoin
 
 SWITCH_DECLARE(switch_codec_interface_t *) switch_loadable_module_get_codec_interface(char *name)
 {
-       return switch_core_hash_find(loadable_modules.codec_hash, name);
+       char ucname[256] = "";
+       int x;
+       
+       for(x = 0; x < strlen(name); x++) {
+               ucname[x] = toupper(name[x]);
+       }
+
+       return switch_core_hash_find(loadable_modules.codec_hash, ucname);
 }
 
 SWITCH_DECLARE(switch_dialplan_interface_t *) switch_loadable_module_get_dialplan_interface(char *name)