[Asterisk-Dev] chan_sip.c patch

Sergey S. Stasyuk stas at onlineua.net
Tue Jul 22 11:08:03 MST 2003


Hi all!
I have already written that there are some problems with chan sip on my
machine. Problem is because of incorrect copy of bindaddr to __ourip
instead of bindaddr.sin_addr. I wonder why this problems are only on my
machine?
I awfully sorry of reposting same message, but would be at least any
comments on this diff?

Best regards,
Sergey Stasyuk

================== Cut here ==============================
diff -u -r1.132 chan_sip.c
--- chan_sip.c  17 Jul 2003 18:49:05 -0000      1.132
+++ chan_sip.c  22 Jul 2003 18:26:24 -0000
@@ -456,7 +456,7 @@
        pkt->seqno = seqno;
        pkt->resp = resp;
        /* Schedule retransmission */
-       pkt->retransid = ast_sched_add(sched, 1000, retrans_pkt, pkt);
+       pkt->retransid = ast_sched_add(sched, DEFAULT_RETRANS,
retrans_pkt, pkt);
        pkt->next = p->packets;
        p->packets = pkt;
        __sip_xmit(pkt->owner, pkt->data, pkt->packetlen);
@@ -5512,7 +5512,7 @@
        }
  
        if (ntohl(bindaddr.sin_addr.s_addr)) {
-               memcpy(&__ourip, &bindaddr, sizeof(__ourip));
+               memcpy(&__ourip, &bindaddr.sin_addr, sizeof(__ourip));
        } else {
                hp = gethostbyname(ourhost);
                if (!hp) {





More information about the asterisk-dev mailing list