[dovecot-cvs] dovecot/src/lib network.c, 1.23, 1.24 network.h, 1.11, 1.12

cras at procontrol.fi cras at procontrol.fi
Mon Jun 14 02:37:42 EEST 2004


Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv4131/lib

Modified Files:
	network.c network.h 
Log Message:
net_gethostbyname() was broken with IPv6 enabled (wasn't really used with
Dovecot anyway). Some other cleanups.



Index: network.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/network.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- network.c	31 May 2004 18:56:43 -0000	1.23
+++ network.c	13 Jun 2004 23:37:40 -0000	1.24
@@ -442,7 +442,7 @@
 	for (ai = origai; ai != NULL; ai = ai->ai_next, count++) {
 		so = (union sockaddr_union *) ai->ai_addr;
 
-		sin_get_ip(so, ips[count]);
+		sin_get_ip(so, &(*ips)[count]);
 	}
 	freeaddrinfo(origai);
 #else
@@ -607,7 +607,7 @@
 }
 
 /* Get name of TCP service */
-char *net_getservbyport(unsigned short port)
+const char *net_getservbyport(unsigned short port)
 {
 	struct servent *entry;
 

Index: network.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/network.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- network.h	31 May 2004 18:56:43 -0000	1.11
+++ network.h	13 Jun 2004 23:37:40 -0000	1.12
@@ -49,9 +49,6 @@
 int net_connect_unix(const char *path);
 /* Disconnect socket */
 void net_disconnect(int fd);
-/* Try to let the other side close the connection, if it still isn't
-   disconnected after certain amount of time, close it ourself */
-void net_disconnect_later(int fd);
 
 /* Set socket blocking/nonblocking */
 void net_set_nonblock(int fd, int nonblock);
@@ -101,7 +98,7 @@
 int net_geterror(int fd);
 
 /* Get name of TCP service */
-char *net_getservbyport(unsigned short port);
+const char *net_getservbyport(unsigned short port);
 
 int is_ipv4_address(const char *addr);
 int is_ipv6_address(const char *addr);



More information about the dovecot-cvs mailing list