From 17c8e77afa8a513f6ad5b5364a7928d3a9c18b6f Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 14 Jan 2009 20:05:09 +0000 Subject: Merge some very simple points of divergence in the two copies of network.c -- enum ordering, whitespace, duplicate macro definitions, unused code, 0 vs NULL... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21746 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/server/network.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/kadmin/server') diff --git a/src/kadmin/server/network.c b/src/kadmin/server/network.c index d0f8afab8..14cfd46ad 100644 --- a/src/kadmin/server/network.c +++ b/src/kadmin/server/network.c @@ -1,7 +1,7 @@ /* * kadmin/server/network.c * - * Copyright 1990,2000,2007,2008 by the Massachusetts Institute of Technology. + * Copyright 1990,2000,2007,2008,2009 by the Massachusetts Institute of Technology. * * Export of this software from the United States of America may * require a specific license from the United States Government. @@ -180,13 +180,16 @@ static const char *paddr (struct sockaddr *sa) /* kadmin data. */ -enum kadm_conn_type { CONN_UDP, CONN_UDP_PKTINFO, CONN_TCP_LISTENER, - CONN_TCP, CONN_ROUTING, CONN_RPC_LISTENER, CONN_RPC }; +enum conn_type { + CONN_UDP, CONN_UDP_PKTINFO, CONN_TCP_LISTENER, CONN_TCP, + CONN_RPC_LISTENER, CONN_RPC, + CONN_ROUTING +}; /* Per-connection info. */ struct connection { int fd; - enum kadm_conn_type type; + enum conn_type type; void (*service)(void *handle, struct connection *, const char *, int); union { /* Type-specific information. */ @@ -331,10 +334,6 @@ static krb5_error_code add_rpc_service(int port, u_long prognum, u_long versnum, return 0; } - -#define USE_AF AF_INET -#define USE_TYPE SOCK_DGRAM - #define USE_AF AF_INET #define USE_TYPE SOCK_DGRAM @@ -351,7 +350,7 @@ struct socksetup { }; static struct connection * -add_fd (struct socksetup *data, int sock, enum kadm_conn_type conntype, +add_fd (struct socksetup *data, int sock, enum conn_type conntype, void (*service)(void *handle, struct connection *, const char *, int)) { struct connection *newconn; -- cgit