comparison src/connect.c @ 366:41958685480d

Switched to `type *name' style Andrew Koenig's ``C Traps and Pitfalls'' (Ch.2.1) convinced me that it is best to go with the way C had been designed. The ``declaration reflects use'' concept conflicts with a ``type* name'' notation. Hence I switched.
author markus schnalke <meillo@marmaro.de>
date Thu, 22 Sep 2011 15:07:40 +0200
parents fc1c6425c024
children b27f66555ba8
comparison
equal deleted inserted replaced
365:934a223e4ee8 366:41958685480d
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18 #include "masqmail.h" 18 #include "masqmail.h"
19 19
20 static GList* 20 static GList*
21 resolve_ip(GList * list, gchar * ip) 21 resolve_ip(GList *list, gchar *ip)
22 { 22 {
23 struct in_addr ia; 23 struct in_addr ia;
24 if (inet_aton(ip, &ia)) { 24 if (inet_aton(ip, &ia)) {
25 mxip_addr mxip; 25 mxip_addr mxip;
26 26
32 /* logwrite(LOG_ALERT, "invalid address '%s': inet_aton() failed\n", ip); */ 32 /* logwrite(LOG_ALERT, "invalid address '%s': inet_aton() failed\n", ip); */
33 return NULL; 33 return NULL;
34 } 34 }
35 35
36 mxip_addr* 36 mxip_addr*
37 connect_hostlist(int *psockfd, gchar * host, guint port, GList * addr_list) 37 connect_hostlist(int *psockfd, gchar *host, guint port, GList *addr_list)
38 { 38 {
39 GList *addr_node; 39 GList *addr_node;
40 struct sockaddr_in saddr; 40 struct sockaddr_in saddr;
41 41
42 DEBUG(5) debugf("connect_hostlist entered\n"); 42 DEBUG(5) debugf("connect_hostlist entered\n");
84 TODO: the resolver functions might return duplicate addresses, 84 TODO: the resolver functions might return duplicate addresses,
85 if attempt failed for one it should not be tried again. 85 if attempt failed for one it should not be tried again.
86 */ 86 */
87 87
88 mxip_addr* 88 mxip_addr*
89 connect_resolvelist(int *psockfd, gchar * host, guint port, GList * res_func_list) 89 connect_resolvelist(int *psockfd, gchar *host, guint port, GList *res_func_list)
90 { 90 {
91 GList *res_node; 91 GList *res_node;
92 GList *addr_list; 92 GList *addr_list;
93 93
94 DEBUG(5) debugf("connect_resolvelist entered\n"); 94 DEBUG(5) debugf("connect_resolvelist entered\n");