Modified: freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c (14511 => 14512)
--- freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c 2009-08-13 21:52:05 UTC (rev 14511)
+++ freeswitch/trunk/src/mod/applications/mod_spy/mod_spy.c 2009-08-13 22:28:22 UTC (rev 14512)
@@ -130,7 +130,7 @@
static void event_handler(switch_event_t* event)
{
- switch_core_session_t *session;
+ switch_core_session_t *session = NULL;
switch_channel_t *channel;
char *username[2] = {0};
char* domain[2] = {0};
@@ -166,12 +166,12 @@
return;
}
+ session = switch_core_session_locate(uuid);
+ channel = switch_core_session_get_channel(session);
+
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,"UserSpy retrieved uuid %s for key %s, activating eavesdrop \n",uuid,key);
my_uuid = switch_event_get_header(event,"Unique-ID");
- session = switch_core_session_locate(uuid);
- channel = switch_core_session_get_channel(session);
-
switch_channel_set_variable(channel,"spy_uuid",my_uuid);
switch_channel_set_state(channel,CS_EXCHANGE_MEDIA);