not only for listening sockets, but also client sockets. This will
allow outbound email to be sourced from the correct IP address when
multiple unrelated Citadels are running on the same server.
#include "snprintf.h"
#endif
#include "sysdep_decls.h"
#include "snprintf.h"
#endif
#include "sysdep_decls.h"
-#include <clientsocket.h>
+#include "config.h"
+#include "clientsocket.h"
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
+ if (strlen(config.c_ip_addr) > 0) {
+ sin.sin_addr.s_addr = inet_addr(config.c_ip_addr);
+ }
pse = getservbyname(service, protocol);
if (pse) {
pse = getservbyname(service, protocol);
if (pse) {