]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
better output
authorMichael Jerris <mike@jerris.com>
Fri, 26 Dec 2008 21:20:58 +0000 (21:20 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 26 Dec 2008 21:20:58 +0000 (21:20 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10964 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/fs_cli.c

index efdee503d8eed4d92174879d441a13ce515c1aef..9855dded0554a44b5adbb22175626b951c54a501 100644 (file)
@@ -391,7 +391,11 @@ int main(int argc, char *argv[])
        esl_log(ESL_LOG_INFO, "Using profile %s [%s]\n", profile->name, profile->host);
        
        if (argv_host) {
-               snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s@%s> ", profile->host, profile->name);
+               if (argv_port && profile->port != 8021) {
+                       snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s:%u@%s> ", profile->host, profile->port, profile->name);
+               } else {
+                       snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s@%s> ", profile->host, profile->name);
+               }
        } else {
                snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", profile->name);
        }