[dovecot-cvs] dovecot/src/master main.c,1.16,1.17 settings.c,1.28,1.29
cras at procontrol.fi
cras at procontrol.fi
Thu Dec 12 20:33:34 EET 2002
Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv16373/src/master
Modified Files:
main.c settings.c
Log Message:
imap_listen and imaps_listen accepts now "*" as "all IPv4 interfaces" and
"::" as "all IPv6 interfaces, plus all IPv4 interfaces if supported by OS".
Added a few consts to network API and added functions to get inaddr_any for
ipv4/ipv6.
Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/main.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- main.c 1 Dec 2002 21:44:42 -0000 1.16
+++ main.c 12 Dec 2002 18:33:32 -0000 1.17
@@ -124,7 +124,21 @@
int ret, ips_count;
if (name == NULL || *name == '\0')
- return NULL;
+ return NULL; /* defaults to "*" or "::" */
+
+ if (strcmp(name, "*") == 0) {
+ /* IPv4 any */
+ ip = t_new(IPADDR, 1);
+ net_get_ip_any4(ip);
+ return ip;
+ }
+
+ if (strcmp(name, "::") == 0) {
+ /* IPv6 any */
+ ip = t_new(IPADDR, 1);
+ net_get_ip_any6(ip);
+ return ip;
+ }
ret = net_gethostbyname(name, &ip, &ips_count);
if (ret != 0)
Index: settings.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/settings.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- settings.c 12 Dec 2002 06:04:30 -0000 1.28
+++ settings.c 12 Dec 2002 18:33:32 -0000 1.29
@@ -90,7 +90,7 @@
/* general */
unsigned int set_imap_port = 143;
unsigned int set_imaps_port = 993;
-char *set_imap_listen = NULL;
+char *set_imap_listen = "*";
char *set_imaps_listen = NULL;
int set_ssl_disable = FALSE;
More information about the dovecot-cvs
mailing list