diff --git a/src/mod/endpoints/mod_opal/mod_opalh323.cpp b/src/mod/endpoints/mod_opal/mod_opalh323.cpp index b83f70e3f1..cc667d63af 100644 --- a/src/mod/endpoints/mod_opal/mod_opalh323.cpp +++ b/src/mod/endpoints/mod_opal/mod_opalh323.cpp @@ -32,7 +32,7 @@ #include "mod_opalh323.h" -#inlcude "opalh323_backend.h" +#include "opalh323_backend.h" #include /* @@ -100,12 +100,6 @@ static switch_state_handler_table_t opalh323_event_handlers = { SWITCH_MODULE_LOAD_FUNCTION(mod_opalh323_load); SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_opalh323_shutdown); SWITCH_MODULE_DEFINITION(mod_opalh323, mod_opalh323_load, mod_opalh323_shutdown, NULL); - -/* - * Pointer to endpoint interface descriptor for this module - */ -switch_endpoint_interface_t *opalh323_endpoint_interface; - /* * This function is called on module load @@ -126,7 +120,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_opalh323_load) { return SWITCH_STATUS_MEMERR; } - opalh323_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); + opalh323_endpoint_interface = (switch_endpoint_interface_t*)switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE); opalh323_endpoint_interface->interface_name = "OPALH323"; opalh323_endpoint_interface->io_routines = &opalh323_io_routines; opalh323_endpoint_interface->state_handler = &opalh323_event_handlers; @@ -139,7 +133,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_opalh323_load) return SWITCH_STATUS_MEMERR; } - if(!opalh323_manager->initialize(pool)) + if(!opalh323_manager->initialize(modname,pool,opalh323_endpoint_interface)) { delete opalh323_manager; return SWITCH_STATUS_FALSE; /* if can't initialize return general error */ @@ -181,7 +175,7 @@ static switch_status_t opalh323_read_frame(switch_core_session_t *session, switc static switch_status_t opalh323_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id) { - return opalh323_manager->io_write_frame(session,frame,timeout,flag,stream_id); + return opalh323_manager->io_write_frame(session,frame,timeout,flags,stream_id); } static switch_status_t opalh323_kill_channel(switch_core_session_t *session, int sig) @@ -196,7 +190,7 @@ static switch_status_t opalh323_waitfor_read(switch_core_session_t *session, int static switch_status_t opalh323_waitfor_write(switch_core_session_t *session, int ms, int stream_id) { - return opalh323_manager->io_waitfor_write(session,ms,sream_id); + return opalh323_manager->io_waitfor_write(session,ms,stream_id); } static switch_status_t opalh323_send_dtmf(switch_core_session_t *session, char *dtmf) @@ -224,9 +218,9 @@ static switch_status_t opalh323_read_video_frame(switch_core_session_t *session, return opalh323_manager->io_read_video_frame(session,frame,timeout,flag,stream_id); } -static switch_status_t opalh323_write_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flag, int stream_id) +static switch_status_t opalh323_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flag, int stream_id) { - return opalh323_manager->io_write_vidoe_frame(session,frame,timeout,flag,stream_id); + return opalh323_manager->io_write_video_frame(session,frame,timeout,flag,stream_id); } /* diff --git a/src/mod/endpoints/mod_opal/mod_opalh323.h b/src/mod/endpoints/mod_opal/mod_opalh323.h index 0a790a1dd2..55488c925d 100644 --- a/src/mod/endpoints/mod_opal/mod_opalh323.h +++ b/src/mod/endpoints/mod_opal/mod_opalh323.h @@ -36,4 +36,4 @@ -#endif /* __FREESWITCH_MOD_OPALH323__ */ \ No newline at end of file +#endif /* __FREESWITCH_MOD_OPALH323__ */ diff --git a/src/mod/endpoints/mod_opal/opalh323_backend.h b/src/mod/endpoints/mod_opal/opalh323_backend.h index d499238b7e..05649ef79a 100644 --- a/src/mod/endpoints/mod_opal/opalh323_backend.h +++ b/src/mod/endpoints/mod_opal/opalh323_backend.h @@ -32,11 +32,7 @@ #include #include -#include -#include - - -class H323EndPoint; +#include /** This class is OpalManager implementation * for FreeSWITCH OpalH323 module. @@ -64,9 +60,9 @@ public: * Method does real initialization of the manager */ bool initialize( - const char* i_modName + const char* i_modName, switch_memory_pool_t* i_memoryPool, - switch_endpoint_interface_t *i_endpointInterface, + switch_endpoint_interface_t *i_endpointInterface ); /** FS callback handlers declarations @@ -106,7 +102,7 @@ private: char *m_pModuleName; /* name of this module */ bool m_isInitilized; /* true if module has been initialized properly */ - H323Endpoint *m_pH323Endpoint; /* h323 endpoint control */ + H323EndPoint *m_pH323Endpoint; /* h323 endpoint control */ switch_memory_pool_t *m_pMemoryPool; /* FS memory pool */ switch_endpoint_interface_t *m_pEndpointInterface; /* FS endpoint inerface */ switch_hash_t *m_pSessionsHashTable; /* Stores pointrs to session object for each Opal connection */