[Freeswitch-svn] [commit] r5705 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Wed Sep 12 18:36:26 EDT 2007
Author: anthm
Date: Wed Sep 12 18:36:26 2007
New Revision: 5705
Modified:
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_core_session.c
Log:
fix backlash from profile clone change
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Wed Sep 12 18:36:26 2007
@@ -836,21 +836,24 @@
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile)
{
+ char *uuid = NULL;
assert(channel != NULL);
assert(channel->session != NULL);
switch_mutex_lock(channel->profile_mutex);
assert(caller_profile != NULL);
-
- if (!caller_profile->uuid) {
- caller_profile->uuid = switch_core_session_strdup(channel->session, switch_core_session_get_uuid(channel->session));
+
+ uuid = switch_core_session_get_uuid(channel->session);
+
+ if (!caller_profile->uuid || strcasecmp(caller_profile->uuid, uuid)) {
+ caller_profile->uuid = switch_core_session_strdup(channel->session, uuid);
}
- if (!caller_profile->chan_name) {
+ if (!caller_profile->chan_name || strcasecmp(caller_profile->chan_name, channel->name)) {
caller_profile->chan_name = switch_core_session_strdup(channel->session, channel->name);
}
if (!caller_profile->context) {
- caller_profile->chan_name = switch_core_session_strdup(channel->session, "default");
+ caller_profile->context = switch_core_session_strdup(channel->session, "default");
}
if (!channel->caller_profile) {
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Wed Sep 12 18:36:26 2007
@@ -300,11 +300,12 @@
switch_channel_set_originator_caller_profile(peer_channel, cloned_profile);
}
}
-
+
if (peer_profile) {
if (session && (cloned_profile = switch_caller_profile_clone(session, peer_profile)) != 0) {
switch_channel_set_originatee_caller_profile(channel, cloned_profile);
}
+ printf("XXXXXXXXXXWTF [%s] [%s] [%s]\n", profile->uuid, peer_profile->uuid, cloned_profile->uuid);
}
}
More information about the Freeswitch-svn
mailing list