Build tohost on options

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 22 years ago
parent fba6a02260
commit fe7038fb2d

@ -4740,7 +4740,10 @@ static int sip_poke_peer(struct sip_peer *peer)
}
memcpy(&p->sa, &peer->addr, sizeof(p->sa));
memcpy(&p->recv, &peer->addr, sizeof(p->sa));
strncpy(p->tohost, peer->tohost, sizeof(p->tohost) - 1);
if (strlen(p->tohost))
strncpy(p->tohost, peer->tohost, sizeof(p->tohost) - 1);
else
snprintf(p->tohost, sizeof(p->tohost), "%s", inet_ntoa(p->addr.sin_addr));
/* Recalculate our side, and recalculate Call ID */
memcpy(&p->ourip, myaddrfor(&p->sa.sin_addr), sizeof(p->ourip));

Loading…
Cancel
Save