<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][14123] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=14123">14123</a></dd>
<dt>Author</dt> <dd>raulfragoso</dd>
<dt>Date</dt> <dd>2009-07-02 16:40:41 -0500 (Thu, 02 Jul 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Removed the static modifiers for the callback functions, so the debug symbols are exported correctly</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkcontribmodendpointsmod_khompmod_khompcpp">freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkcontribmodendpointsmod_khompmod_khompcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp (14122 => 14123)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp        2009-07-02 18:21:02 UTC (rev 14122)
+++ freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp        2009-07-02 21:40:41 UTC (rev 14123)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> \return ksSuccess if the event was treated
</span><span class="cx"> \see K3L_EVENT Event specification
</span><span class="cx"> */
</span><del>-static int32 Kstdcall khomp_event_callback(int32 obj, K3L_EVENT * e);
</del><ins>+int32 Kstdcall khomp_event_callback(int32 obj, K3L_EVENT * e);
</ins><span class="cx">
</span><span class="cx"> /*!
</span><span class="cx"> \brief Callback generated from K3L API everytime audio is available on the board.
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> @param[in] read_size The buffer size, meaning the amount of data to be read
</span><span class="cx"> \return ksSuccess if the event was treated
</span><span class="cx"> */
</span><del>-static void Kstdcall khomp_audio_listener(int32 deviceid, int32 objectid,
</del><ins>+void Kstdcall khomp_audio_listener(int32 deviceid, int32 objectid,
</ins><span class="cx"> byte * read_buffer, int32 read_size);
</span><span class="cx">
</span><span class="cx"> /*!
</span><span class="lines">@@ -77,14 +77,14 @@
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_khomp, mod_khomp_load, mod_khomp_shutdown, NULL);
</span><span class="cx">
</span><span class="cx"> /* State handlers for FreeSWITCH */
</span><del>-static switch_status_t channel_on_init(switch_core_session_t *session);
-static switch_status_t channel_on_routing(switch_core_session_t *session);
-static switch_status_t channel_on_execute(switch_core_session_t *session);
-static switch_status_t channel_on_hangup(switch_core_session_t *session);
-static switch_status_t channel_on_exchange_media(
</del><ins>+switch_status_t channel_on_init(switch_core_session_t *session);
+switch_status_t channel_on_routing(switch_core_session_t *session);
+switch_status_t channel_on_execute(switch_core_session_t *session);
+switch_status_t channel_on_hangup(switch_core_session_t *session);
+switch_status_t channel_on_exchange_media(
</ins><span class="cx"> switch_core_session_t *session);
</span><del>-static switch_status_t channel_on_soft_execute(switch_core_session_t *session);
-static switch_status_t channel_on_destroy(switch_core_session_t *session);
</del><ins>+switch_status_t channel_on_soft_execute(switch_core_session_t *session);
+switch_status_t channel_on_destroy(switch_core_session_t *session);
</ins><span class="cx">
</span><span class="cx"> switch_state_handler_table_t khomp_state_handlers = {
</span><span class="cx"> /*.on_init */ channel_on_init,
</span><span class="lines">@@ -102,28 +102,28 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> /* Callbacks for FreeSWITCH */
</span><del>-static switch_call_cause_t channel_outgoing_channel(
</del><ins>+switch_call_cause_t channel_outgoing_channel(
</ins><span class="cx"> switch_core_session_t *session,
</span><span class="cx"> switch_event_t *var_event,
</span><span class="cx"> switch_caller_profile_t *outbound_profile,
</span><span class="cx"> switch_core_session_t **new_session,
</span><span class="cx"> switch_memory_pool_t **pool,
</span><span class="cx"> switch_originate_flag_t flags);
</span><del>-static switch_status_t channel_read_frame(switch_core_session_t *session,
</del><ins>+switch_status_t channel_read_frame(switch_core_session_t *session,
</ins><span class="cx"> switch_frame_t **frame,
</span><span class="cx"> switch_io_flag_t flags,
</span><span class="cx"> int stream_id);
</span><del>-static switch_status_t channel_write_frame(switch_core_session_t *session,
</del><ins>+switch_status_t channel_write_frame(switch_core_session_t *session,
</ins><span class="cx"> switch_frame_t *frame,
</span><span class="cx"> switch_io_flag_t flags,
</span><span class="cx"> int stream_id);
</span><del>-static switch_status_t channel_kill_channel(switch_core_session_t *session,
</del><ins>+switch_status_t channel_kill_channel(switch_core_session_t *session,
</ins><span class="cx"> int sig);
</span><del>-static switch_status_t channel_send_dtmf(switch_core_session_t *session,
</del><ins>+switch_status_t channel_send_dtmf(switch_core_session_t *session,
</ins><span class="cx"> const switch_dtmf_t *dtmf);
</span><del>-static switch_status_t channel_receive_message(switch_core_session_t *session,
</del><ins>+switch_status_t channel_receive_message(switch_core_session_t *session,
</ins><span class="cx"> switch_core_session_message_t *msg);
</span><del>-static switch_status_t channel_receive_event(switch_core_session_t *session,
</del><ins>+switch_status_t channel_receive_event(switch_core_session_t *session,
</ins><span class="cx"> switch_event_t *event);
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -143,16 +143,16 @@
</span><span class="cx"> /*!
</span><span class="cx"> \brief Print a system summary for all the boards. [khomp show info]
</span><span class="cx"> */
</span><del>-static void printSystemSummary(switch_stream_handle_t* stream);
</del><ins>+void printSystemSummary(switch_stream_handle_t* stream);
</ins><span class="cx"> /*!
</span><span class="cx"> \brief Print link status. [khomp show links]
</span><span class="cx"> */
</span><del>-static void printLinks(switch_stream_handle_t* stream, unsigned int device,
</del><ins>+void printLinks(switch_stream_handle_t* stream, unsigned int device,
</ins><span class="cx"> unsigned int link);
</span><span class="cx"> /*!
</span><span class="cx"> \brief Print board channel status. [khomp show channels]
</span><span class="cx"> */
</span><del>-static void printChannels(switch_stream_handle_t* stream, unsigned int device,
</del><ins>+void printChannels(switch_stream_handle_t* stream, unsigned int device,
</ins><span class="cx"> unsigned int link);
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx"> \brief Will init part of our private structure and setup all the read/write
</span><span class="cx"> buffers along with the proper codecs. Right now, only PCMA.
</span><span class="cx"> */
</span><del>-static switch_status_t tech_init(KhompPvt *tech_pvt, switch_core_session_t *session)
</del><ins>+switch_status_t tech_init(KhompPvt *tech_pvt, switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> tech_pvt->flags = 0;
</span><span class="cx">
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx"> returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
</span><span class="cx"> so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
</span><span class="cx"> */
</span><del>-static switch_status_t channel_on_init(switch_core_session_t *session)
</del><ins>+switch_status_t channel_on_init(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> KhompPvt * tech_pvt = static_cast< KhompPvt* >(switch_core_session_get_private(session));
</span><span class="cx"> assert(tech_pvt != NULL);
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_on_routing(switch_core_session_t *session)
</del><ins>+switch_status_t channel_on_routing(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> switch_channel_t *channel = NULL;
</span><span class="cx"> KhompPvt *tech_pvt = NULL;
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_on_execute(switch_core_session_t *session)
</del><ins>+switch_status_t channel_on_execute(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx">
</span><span class="cx"> switch_channel_t *channel = NULL;
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_on_hangup(switch_core_session_t *session)
</del><ins>+switch_status_t channel_on_hangup(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> switch_channel_t *channel = NULL;
</span><span class="cx"> KhompPvt *tech_pvt = NULL;
</span><span class="lines">@@ -322,14 +322,14 @@
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_on_destroy(switch_core_session_t *session)
</del><ins>+switch_status_t channel_on_destroy(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> /* Doesn't do anything for now */
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
</del><ins>+switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
</ins><span class="cx"> {
</span><span class="cx"> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL KILL, kill = %d\n", sig);
</span><span class="cx"> switch_channel_t *channel = NULL;
</span><span class="lines">@@ -358,19 +358,19 @@
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_on_exchange_media(switch_core_session_t *session)
</del><ins>+switch_status_t channel_on_exchange_media(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL LOOPBACK\n");
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_on_soft_execute(switch_core_session_t *session)
</del><ins>+switch_status_t channel_on_soft_execute(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL TRANSMIT\n");
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_send_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf)
</del><ins>+switch_status_t channel_send_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf)
</ins><span class="cx"> {
</span><span class="cx"> KhompPvt *tech_pvt = static_cast<KhompPvt*>(switch_core_session_get_private(session));
</span><span class="cx"> switch_assert(tech_pvt != NULL);
</span><span class="lines">@@ -378,7 +378,7 @@
</span><span class="cx"> return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id)
</del><ins>+switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id)
</ins><span class="cx"> {
</span><span class="cx"> switch_channel_t *channel = NULL;
</span><span class="cx"> KhompPvt *tech_pvt = NULL;
</span><span class="lines">@@ -433,7 +433,7 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)
</del><ins>+switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)
</ins><span class="cx"> {
</span><span class="cx"> switch_channel_t *channel = NULL;
</span><span class="cx"> KhompPvt *tech_pvt = NULL;
</span><span class="lines">@@ -459,7 +459,7 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_answer_channel(switch_core_session_t *session)
</del><ins>+switch_status_t channel_answer_channel(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> KhompPvt *tech_pvt;
</span><span class="cx"> switch_channel_t *channel = NULL;
</span><span class="lines">@@ -474,7 +474,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-static switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
</del><ins>+switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
</ins><span class="cx"> {
</span><span class="cx"> switch_channel_t *channel;
</span><span class="cx"> KhompPvt *tech_pvt;
</span><span class="lines">@@ -504,7 +504,7 @@
</span><span class="cx"> \brief Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
</span><span class="cx"> that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
</span><span class="cx"> */
</span><del>-static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_event_t *var_event,
</del><ins>+switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_event_t *var_event,
</ins><span class="cx"> switch_caller_profile_t *outbound_profile,
</span><span class="cx"> switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
</span><span class="cx"> {
</span><span class="lines">@@ -589,7 +589,7 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_status_t channel_receive_event(switch_core_session_t *session, switch_event_t *event)
</del><ins>+switch_status_t channel_receive_event(switch_core_session_t *session, switch_event_t *event)
</ins><span class="cx"> {
</span><span class="cx"> struct KhompPvt *tech_pvt = static_cast<KhompPvt*>(switch_core_session_get_private(session));
</span><span class="cx"> char *body = switch_event_get_body(event);
</span><span class="lines">@@ -737,7 +737,7 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void printChannels(switch_stream_handle_t* stream, unsigned int device, unsigned int link) {
</del><ins>+void printChannels(switch_stream_handle_t* stream, unsigned int device, unsigned int link) {
</ins><span class="cx"> if (!device) {
</span><span class="cx"> // Print all channels from all boards and links
</span><span class="cx"> stream->write_function(stream, "|--------- Khomp ----------|\n");
</span><span class="lines">@@ -777,7 +777,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void printLinks(switch_stream_handle_t* stream, unsigned int device, unsigned int link)
</del><ins>+void printLinks(switch_stream_handle_t* stream, unsigned int device, unsigned int link)
</ins><span class="cx"> {
</span><span class="cx">
</span><span class="cx"> stream->write_function(stream, "___________________________________________\n");
</span><span class="lines">@@ -872,7 +872,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-static void printSystemSummary(switch_stream_handle_t* stream) {
</del><ins>+void printSystemSummary(switch_stream_handle_t* stream) {
</ins><span class="cx">
</span><span class="cx"> K3L_API_CONFIG apiCfg;
</span><span class="cx">
</span><span class="lines">@@ -1074,7 +1074,7 @@
</span><span class="cx"> return ksSuccess;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static int32 Kstdcall khomp_event_callback(int32 obj, K3L_EVENT * e)
</del><ins>+int32 Kstdcall khomp_event_callback(int32 obj, K3L_EVENT * e)
</ins><span class="cx"> {
</span><span class="cx"> /* TODO: How do we make sure channels inside FreeSWITCH only change to valid states on K3L? */
</span><span class="cx">
</span><span class="lines">@@ -1248,7 +1248,7 @@
</span><span class="cx"> return ksSuccess;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void Kstdcall khomp_audio_listener (int32 deviceid, int32 objectid, byte * read_buffer, int32 read_size)
</del><ins>+void Kstdcall khomp_audio_listener (int32 deviceid, int32 objectid, byte * read_buffer, int32 read_size)
</ins><span class="cx"> {
</span><span class="cx"> KhompPvt * pvt = KhompPvt::khompPvt(deviceid, objectid);
</span><span class="cx"> /*TODO: write to the switch_buffer_t member, which will be read by channel_read_frame */
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>