]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 21 Nov 2006 15:43:55 +0000 (15:43 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 21 Nov 2006 15:43:55 +0000 (15:43 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3430 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_dingaling/mod_dingaling.c

index d76279e20f266097ffb7c9554e242fb5db6503dd..367f93c3c405261065fa2e6d640d842572bdfda1 100644 (file)
@@ -1487,20 +1487,20 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
                        *dnis++ = '\0';
                }
 
+               if ((mdl_profile->user_flags & LDL_FLAG_COMPONENT)) {
+                       if ((p = strchr(profile_name, '@'))) {
+                               *p++ = '\0';
+                               u = profile_name;
+                               profile_name = p;
+                               snprintf(ubuf, sizeof(ubuf), "%s@%s/talk", u, profile_name);
+                               user = ubuf;
+                       } else {
+                               terminate_session(new_session,  __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+                               return SWITCH_STATUS_GENERR;
+                       }
+               } 
+
                if ((mdl_profile = switch_core_hash_find(globals.profile_hash, profile_name))) {
-                       if ((mdl_profile->user_flags & LDL_FLAG_COMPONENT)) {
-                               if ((p = strchr(profile_name, '@'))) {
-                                       *p++ = '\0';
-                                       u = profile_name;
-                                       profile_name = p;
-                                       snprintf(ubuf, sizeof(ubuf), "%s@%s/talk", u, profile_name);
-                                       user = ubuf;
-                               } else {
-                                       terminate_session(new_session,  __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
-                                       return SWITCH_STATUS_GENERR;
-                               }
-                       } 
-                       
                        if (strchr(outbound_profile->caller_id_number, '@')) {
                                snprintf(ubuf, sizeof(ubuf), "%s/talk", outbound_profile->caller_id_number);
                                user = ubuf;