Fossil SCM
Make sure the g.zIpAddr is reset for each new ssh: URL.
Commit
be18690cada2044dc3fbaf3f79fc130cf1e7a377c542e4160003ba35c6036942
Parent
cd5715513e2105c…
1 file changed
+2
+2
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -247,10 +247,12 @@ | ||
| 247 | 247 | char zRemote[NI_MAXHOST]; |
| 248 | 248 | memset(&hints, 0, sizeof(hints)); |
| 249 | 249 | hints.ai_family = AF_UNSPEC; |
| 250 | 250 | hints.ai_socktype = SOCK_STREAM; |
| 251 | 251 | hints.ai_protocol = IPPROTO_TCP; |
| 252 | + fossil_free(g.zIpAddr); | |
| 253 | + g.zIpAddr = 0; | |
| 252 | 254 | if( getaddrinfo(pUrlData->name, NULL, &hints, &ai)==0 |
| 253 | 255 | && ai!=0 |
| 254 | 256 | && getnameinfo(ai->ai_addr, ai->ai_addrlen, zRemote, |
| 255 | 257 | sizeof(zRemote), 0, 0, NI_NUMERICHOST)==0 ){ |
| 256 | 258 | g.zIpAddr = mprintf("%s (%s)", zRemote, pUrlData->name); |
| 257 | 259 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -247,10 +247,12 @@ | |
| 247 | char zRemote[NI_MAXHOST]; |
| 248 | memset(&hints, 0, sizeof(hints)); |
| 249 | hints.ai_family = AF_UNSPEC; |
| 250 | hints.ai_socktype = SOCK_STREAM; |
| 251 | hints.ai_protocol = IPPROTO_TCP; |
| 252 | if( getaddrinfo(pUrlData->name, NULL, &hints, &ai)==0 |
| 253 | && ai!=0 |
| 254 | && getnameinfo(ai->ai_addr, ai->ai_addrlen, zRemote, |
| 255 | sizeof(zRemote), 0, 0, NI_NUMERICHOST)==0 ){ |
| 256 | g.zIpAddr = mprintf("%s (%s)", zRemote, pUrlData->name); |
| 257 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -247,10 +247,12 @@ | |
| 247 | char zRemote[NI_MAXHOST]; |
| 248 | memset(&hints, 0, sizeof(hints)); |
| 249 | hints.ai_family = AF_UNSPEC; |
| 250 | hints.ai_socktype = SOCK_STREAM; |
| 251 | hints.ai_protocol = IPPROTO_TCP; |
| 252 | fossil_free(g.zIpAddr); |
| 253 | g.zIpAddr = 0; |
| 254 | if( getaddrinfo(pUrlData->name, NULL, &hints, &ai)==0 |
| 255 | && ai!=0 |
| 256 | && getnameinfo(ai->ai_addr, ai->ai_addrlen, zRemote, |
| 257 | sizeof(zRemote), 0, 0, NI_NUMERICHOST)==0 ){ |
| 258 | g.zIpAddr = mprintf("%s (%s)", zRemote, pUrlData->name); |
| 259 |