comparison tcp-accept.c @ 632:abf040aedd44

Fix crash with -R forwarding
author Matt Johnston <matt@ucc.asn.au>
date Sun, 06 Nov 2011 20:22:34 +0800
parents d2daeb015138
children dfdb9d9189ff
comparison
equal deleted inserted replaced
631:af304deacb4c 632:abf040aedd44
80 /* address that was connected, port that was connected */ 80 /* address that was connected, port that was connected */
81 addr = tcpinfo->listenaddr; 81 addr = tcpinfo->listenaddr;
82 port = tcpinfo->listenport; 82 port = tcpinfo->listenport;
83 } 83 }
84 84
85 if (addr == NULL) {
86 addr = "localhost";
87 }
85 buf_putstring(ses.writepayload, addr, strlen(addr)); 88 buf_putstring(ses.writepayload, addr, strlen(addr));
86 buf_putint(ses.writepayload, port); 89 buf_putint(ses.writepayload, port);
87 90
88 /* originator ip */ 91 /* originator ip */
89 buf_putstring(ses.writepayload, ipstring, strlen(ipstring)); 92 buf_putstring(ses.writepayload, ipstring, strlen(ipstring));