Hi,

with this patch the nua settings are not printed anymore at startup,
but whenever the user issue the "set" command.

Rationale: avoid to scare the user at startup with unwanted settings
printing, and provide a more useful output for the set command.

Also changes location to the code which prints the:
"Starting sofsip-cli in interactive mode. Issue 'h' to get list of
available commands."

banner, which seems to be more suited for src/sofsip_cli.c rather than
for src/ssc_sip.c.

Regards.
--- old-sofsip-cli/src/ssc_sip.c	2008-07-31 15:52:08.000000000 +0200
+++ new-sofsip-cli/src/ssc_sip.c	2008-07-31 15:52:08.000000000 +0200
@@ -246,7 +246,6 @@
 		   TAG_IF(conf->ssc_certdir,
 			  NUTAG_CERTIFICATE_DIR(conf->ssc_certdir)),
 		   TAG_NULL());
-    nua_get_params(ssc->ssc_nua, TAG_ANY(), TAG_NULL());
   }
   else {
     ssc_destroy(ssc);
@@ -1897,8 +1896,6 @@
       ssc->ssc_address = su_strdup(ssc->ssc_home, new_address);
     }      
   }
-
-  printf("\nStarting sofsip-cli in interactive mode. Issue 'h' to get list of available commands.\n");
 }
 
 /**
@@ -1920,7 +1917,7 @@
 
 void ssc_print_settings(ssc_t *ssc)
 {
-  printf("SIP address...........: %s\n", ssc->ssc_address);
+  nua_get_params(ssc->ssc_nua, TAG_ANY(), TAG_NULL());
 }
 
 void ssc_param(ssc_t *ssc, char *param, char *s)

--- old-sofsip-cli/src/sofsip_cli.c	2008-07-31 15:52:08.000000000 +0200
+++ new-sofsip-cli/src/sofsip_cli.c	2008-07-31 15:52:08.000000000 +0200
@@ -162,6 +162,7 @@
   cli->cli_ssc = ssc_create(cli->cli_home, cli->cli_root, cli->cli_conf);
 
   if (res != -1 && cli->cli_ssc) {
+    printf("\nStarting sofsip-cli in interactive mode. Issue 'h' to get list of available commands.\n");
 
     cli->cli_ssc->ssc_exit_cb = sofsip_shutdown_cb;
     cli->cli_ssc->ssc_auth_req_cb = sofsip_auth_req_cb;

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to