]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6093 --resolve
authorRaymond Chandler <intralanman@gmail.com>
Thu, 9 Jan 2014 19:30:41 +0000 (14:30 -0500)
committerRaymond Chandler <intralanman@gmail.com>
Thu, 9 Jan 2014 19:30:41 +0000 (14:30 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c

index 5e27ccc86437ca15164734682a6db5af5382099d..59b7a6102ed5d64a58604e87f143417ea0430add 100644 (file)
@@ -4967,17 +4967,17 @@ static void general_event_handler(switch_event_t *event)
                        sofia_profile_t *profile;
                        nua_handle_t *nh;
 
-                       if (!profile_name || !(profile = sofia_glue_find_profile(profile_name))) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find profile %s\n", profile_name);
-                               return;
-                       }
-
                        if (ct && user && host) {
                                char *id = NULL;
                                char *contact, *p;
                                switch_console_callback_match_t *list = NULL;
                                switch_console_callback_match_node_t *m;
 
+                               if (!profile_name || !(profile = sofia_glue_find_profile(profile_name))) {
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find profile %s\n", profile_name);
+                                       return;
+                               }
+
                                if (!(list = sofia_reg_find_reg_url_multi(profile, user, host))) {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find registered user %s@%s\n", user, host);
                                        return;