diff src/listen.c @ 204:5745edd5b769

removed the --disable-smtp-server configure option masqmail will now always have the possibility to listen on a port compiled in if you don't want it to listen on a port add this to your masqmail.conf: listen_addresses = "" also, if you don't start it as daemon it will not listen neither
author meillo@marmaro.de
date Fri, 16 Jul 2010 15:38:53 +0200
parents f671821d8222
children dcb315792513
line wrap: on
line diff
--- a/src/listen.c	Fri Jul 16 14:48:17 2010 +0200
+++ b/src/listen.c	Fri Jul 16 15:38:53 2010 +0200
@@ -46,7 +46,6 @@
 	signal(SIGCHLD, sigchld_handler);
 }
 
-#ifdef ENABLE_SMTP_SERVER
 void
 accept_connect(int listen_sock, int sock, struct sockaddr_in *sock_addr)
 {
@@ -92,7 +91,6 @@
 	close(sock);
 	close(dup_sock);
 }
-#endif  /*ifdef ENABLE_SMTP_SERVER */
 
 void
 listen_port(GList * iface_list, gint qival, char *argv[])
@@ -108,7 +106,6 @@
 
 	/* Create the sockets and set them up to accept connections. */
 	FD_ZERO(&active_fd_set);
-#ifdef ENABLE_SMTP_SERVER
 	for (node = g_list_first(iface_list); node; node = node_next) {
 		interface *iface = (interface *) (node->data);
 		int sock;
@@ -127,7 +124,6 @@
 		DEBUG(5) debugf("sock = %d\n", sock);
 		FD_SET(sock, &active_fd_set);
 	}
-#endif
 
 	/* setup handler for HUP signal: */
 	signal(SIGHUP, sighup_handler);
@@ -192,7 +188,6 @@
 				}
 			}
 		} else if (sel_ret > 0) {
-#ifdef ENABLE_SMTP_SERVER
 			for (i = 0; i < FD_SETSIZE; i++) {
 				if (FD_ISSET(i, &read_fd_set)) {
 					int sock = i;
@@ -205,9 +200,6 @@
 						accept_connect(sock, new, &clientname);
 				}
 			}
-#else
-			;
-#endif
 		} else {
 			/* If select returns 0, the interval time has elapsed.
 			   We start a new queue runner process */