Set the context properly for a given peer
authorMark Spencer <markster@digium.com>
Thu, 4 Mar 2004 23:43:58 +0000 (23:43 +0000)
committerMark Spencer <markster@digium.com>
Thu, 4 Mar 2004 23:43:58 +0000 (23:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2336 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 1206669..801c557 100755 (executable)
@@ -2122,6 +2122,8 @@ static int iax2_call(struct ast_channel *c, char *dest, int timeout)
        if (!secret && strlen(storedsecret))
                secret = storedsecret;
        ast_mutex_lock(&iaxsl[callno]);
+       if (strlen(c->context))
+               strncpy(iaxs[callno]->context, c->context, sizeof(iaxs[callno]->context));
        if (secret) {
                if (secret[0] == '[') {
                        /* This is an RSA key, not a normal secret */