]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Fri, 19 May 2006 20:06:50 +0000 (20:06 +0000)
committerAutomerge script <automerge@asterisk.org>
Fri, 19 May 2006 20:06:50 +0000 (20:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@28831 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
utils/smsq.c

index 4767bb4b9cac72e937df56580cf902e64807c979..2a170b8f6a26b1c1f2a899ad5ab6544e60b3614d 100644 (file)
@@ -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)
index 361fc267997a94b471a874ff2385e2d6d7138122..429ca0004d7644a1a62416caf24561d367ed1512 100644 (file)
@@ -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);
    }