if specified, use our bind-ip for the http clients.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Jun 2011 16:44:59 +0000 (16:44 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Jun 2011 16:44:59 +0000 (16:44 +0000)
citadel/modules/eventclient/serv_eventclient.c

index f2fbef00a6d93bab1b9d43e9e3ddb1bc6f2ffb04..971200e5288e8f9f37c4910bc78270a5de7cd108 100644 (file)
@@ -337,6 +337,14 @@ int evcurl_init(AsyncIO *IO,
        OPT(WRITEDATA, (void *)IO);
        OPT(ERRORBUFFER, IO->HttpReq.errdesc);
 
+       if (
+               (!IsEmptyStr(config.c_ip_addr))
+               && (strcmp(config.c_ip_addr, "*"))
+               && (strcmp(config.c_ip_addr, "::"))
+               && (strcmp(config.c_ip_addr, "0.0.0.0"))
+       ) {
+               OPT(INTERFACE, config.c_ip_addr);
+       }
                /* point to a structure that points back to the perl structure and stuff */
        CtdlLogPrintf(CTDL_DEBUG, "EVCURL: Loading URL: %s\n", IO->ConnectMe->PlainUrl);
        OPT(URL, IO->ConnectMe->PlainUrl);