diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 20:06:50 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 20:06:50 +0000 |
commit | cf74dcf5e8b487df8ebe14216577a8a85193533f (patch) | |
tree | 55e29e5aa49c1e975b1ff0ceee7a282c08f30f4e | |
parent | a5842441d6aa2f39bcb0045d4dd3e13cce225561 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@28831 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 8 | ||||
-rw-r--r-- | utils/smsq.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4767bb4b9..2a170b8f6 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10933,13 +10933,17 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, } return 0; } - /* Initialize the context if it hasn't been already */ + gotdest = get_destination(p, NULL); + /* Initialize the context if it hasn't been already; + note this is done _after_ handling any domain lookups, + because the context specified there is for calls, not + subscriptions + */ if (!ast_strlen_zero(p->subscribecontext)) ast_copy_string(p->context, p->subscribecontext, sizeof(p->context)); else if (ast_strlen_zero(p->context)) strcpy(p->context, default_context); /* Get destination right away */ - gotdest = get_destination(p, NULL); build_contact(p); if (gotdest) { if (gotdest < 0) diff --git a/utils/smsq.c b/utils/smsq.c index 361fc2679..429ca0004 100644 --- a/utils/smsq.c +++ b/utils/smsq.c @@ -142,7 +142,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch p = channel; p = strchr (p, 'X'); if (p) - fprintf (f, "%.*s%c%s\n", p - channel, channel, subaddress, p + 1); + fprintf (f, "%.*s%c%s\n", (int)(p - channel), channel, subaddress, p + 1); else fprintf (f, "%s\n", channel); } @@ -153,7 +153,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch { p = strchr (callerid, 'X'); if (p) - fprintf (f, "%.*s%c%s", p - callerid, callerid, subaddress, p + 1); + fprintf (f, "%.*s%c%s", (int)(p - callerid), callerid, subaddress, p + 1); else fprintf (f, "%s", callerid); } |