fix sql
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5988 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
7c3f707fef
commit
f2c02d65ee
|
@ -979,8 +979,8 @@ static int show_reg_callback(void *pArg, int argc, char **argv, char **columnNam
|
|||
switch_time_exp_t tm;
|
||||
|
||||
|
||||
if (argv[5]) {
|
||||
switch_time_t etime = atoi(argv[5]);
|
||||
if (argv[6]) {
|
||||
switch_time_t etime = atoi(argv[6]);
|
||||
switch_size_t retsize;
|
||||
|
||||
switch_time_exp_lt(&tm, switch_time_from_sec(etime));
|
||||
|
@ -989,11 +989,12 @@ static int show_reg_callback(void *pArg, int argc, char **argv, char **columnNam
|
|||
|
||||
|
||||
cb->stream->write_function(cb->stream,
|
||||
"Call-ID \t%s\n"
|
||||
"User \t%s@%s\n"
|
||||
"Contact \t%s\n"
|
||||
"Status \t%s(%s) EXP(%s)\n\n",
|
||||
switch_str_nil(argv[0]), switch_str_nil(argv[1]), switch_str_nil(argv[2]),
|
||||
switch_str_nil(argv[3]), switch_str_nil(argv[4]), exp_buf);
|
||||
switch_str_nil(argv[0]), switch_str_nil(argv[1]), switch_str_nil(argv[2]), switch_str_nil(argv[3]),
|
||||
switch_str_nil(argv[4]), switch_str_nil(argv[5]), exp_buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -156,8 +156,8 @@ int sofia_reg_nat_callback(void *pArg, int argc, char **argv, char **columnNames
|
|||
char *contact;
|
||||
char to[128] = "";
|
||||
|
||||
snprintf(to, sizeof(to), "%s@%s", argv[0], argv[1]);
|
||||
contact = sofia_glue_get_url_from_contact(argv[2], 1);
|
||||
snprintf(to, sizeof(to), "%s@%s", argv[1], argv[2]);
|
||||
contact = sofia_glue_get_url_from_contact(argv[3], 1);
|
||||
|
||||
nh = nua_handle(profile->nua, NULL, SIPTAG_FROM_STR(profile->url), SIPTAG_TO_STR(to), NUTAG_URL(contact), SIPTAG_CONTACT_STR(profile->url), TAG_END());
|
||||
|
||||
|
@ -176,10 +176,11 @@ int sofia_reg_del_callback(void *pArg, int argc, char **argv, char **columnNames
|
|||
if (argc >= 3) {
|
||||
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_EXPIRE) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile-name", "%s", argv[0]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "user", "%s", argv[1]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "host", "%s", argv[2]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s", argv[3]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%s", argv[4]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "call-id", "%s", argv[1]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "user", "%s", argv[2]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "host", "%s", argv[3]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s", argv[4]);
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%s", argv[5]);
|
||||
switch_event_fire(&s_event);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue