Store password for later authentication needs
authorMark Spencer <markster@digium.com>
Fri, 22 Aug 2003 18:51:58 +0000 (18:51 +0000)
committerMark Spencer <markster@digium.com>
Fri, 22 Aug 2003 18:51:58 +0000 (18:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1408 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ff3f089..5099c2a 100755 (executable)
@@ -3691,6 +3691,7 @@ static int check_user(struct sip_pvt *p, struct sip_request *req, char *cmd, cha
                                if (strlen(user->callerid) && strlen(p->callerid)) 
                                        strncpy(p->callerid, user->callerid, sizeof(p->callerid) - 1);
                                strncpy(p->username, user->name, sizeof(p->username) - 1);
+                               strncpy(p->peersecret, user->secret, sizeof(p->peersecret) - 1);
                                strncpy(p->accountcode, user->accountcode, sizeof(p->accountcode)  -1);
                                p->canreinvite = user->canreinvite;
                                p->amaflags = user->amaflags;
@@ -3732,6 +3733,7 @@ static int check_user(struct sip_pvt *p, struct sip_request *req, char *cmd, cha
                                strncpy(p->peername, peer->name, sizeof(p->peername) - 1);
                                if (strlen(peer->context))
                                        strncpy(p->context, peer->context, sizeof(p->context) - 1);
+                               strncpy(p->peersecret, peer->secret, sizeof(p->peersecret) - 1);
                                p->callgroup = peer->callgroup;
                                p->pickupgroup = peer->pickupgroup;
                                if (peer->dtmfmode) {