Commit dd033371 authored by Pekka Pessi's avatar Pekka Pessi

Printing all events.

darcs-hash:20050929182639-65a35-0703d175bd3293c1eb4bd0cdfe5d1ace25674ac1.gz
parent 2250440b
......@@ -376,6 +376,12 @@ void cli_callback(nua_event_t event,
{
assert(cli);
if (cli->cli_debug) {
printf("%s: event %s (%d)\n",
cli->cli_name, nua_event_name(event), event);
tl_print(stdout, "", tags);
}
switch (event) {
case nua_r_shutdown:
cli_r_shutdown(status, phrase, nua, cli, nh, op, sip, tags);
......@@ -482,12 +488,15 @@ void cli_callback(nua_event_t event,
}
if (status > 100)
printf("%s: unknown event %d: %03d %s\n",
cli->cli_name, event, status, phrase);
printf("%s: event %s (%d) not handled: %03d %s\n",
cli->cli_name, nua_event_name(event), event, status, phrase);
else
printf("%s: unknown event %d\n", cli->cli_name, event);
printf("%s: event %s (%d) not handled\n",
cli->cli_name, nua_event_name(event), event);
if (!cli->cli_debug)
tl_print(stdout, "", tags);
tl_print(stdout, "", tags);
cli_prompt(cli);
}
......@@ -1858,6 +1867,8 @@ int cli_init(cli_t *cli, char *av[])
cli->cli_media = av++[1] + 8;
cli->cli_contact = av[1];
cli->cli_debug = 1;
/* Disable threading by command line switch? */
su_root_threading(cli->cli_root, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment