diff options
author | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-03-25 17:57:54 -0400 |
---|---|---|
committer | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-03-25 17:57:54 -0400 |
commit | 4b5802ddbd45271be3cadeae0a83a6742df2515b (patch) | |
tree | 9569d18b523da979175562b113dd610752afd6ec /os/xdmcp.c | |
parent | 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4 (diff) |
General DIX static and dead code cleanup.
Diffstat (limited to 'os/xdmcp.c')
-rw-r--r-- | os/xdmcp.c | 58 |
1 files changed, 23 insertions, 35 deletions
diff --git a/os/xdmcp.c b/os/xdmcp.c index cfc1005c2..310f33bc0 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -197,8 +197,6 @@ static void receive_packet(int /*socketfd*/); static void send_packet(void); -extern void XdmcpDeadSession(char * /*reason*/); - static void timeout(void); static void restart(void); @@ -213,10 +211,23 @@ static void XdmcpWakeupHandler( int /*i*/, pointer /*LastSelectMask*/); -void XdmcpRegisterManufacturerDisplayID( - char * /*name*/, - int /*length*/); +/* + * Register the Manufacturer display ID + */ + +static ARRAY8 ManufacturerDisplayID; + +static void +XdmcpRegisterManufacturerDisplayID (char *name, int length) +{ + int i; + XdmcpDisposeARRAY8 (&ManufacturerDisplayID); + if (!XdmcpAllocARRAY8 (&ManufacturerDisplayID, length)) + return; + for (i = 0; i < length; i++) + ManufacturerDisplayID.data[i] = (CARD8) name[i]; +} static unsigned short xdm_udp_port = XDM_UDP_PORT; static Bool OneSession = FALSE; @@ -417,7 +428,7 @@ static ARRAY8Ptr AuthenticationName = &noAuthenticationName; static ARRAY8Ptr AuthenticationData = &noAuthenticationData; static AuthenticationFuncsPtr AuthenticationFuncs; -void +static void XdmcpSetAuthentication (ARRAY8Ptr name) { int i; @@ -549,7 +560,7 @@ XdmcpRegisterAuthorization (char *name, int namelen) static ARRAY8 DisplayClass; -void +static void XdmcpRegisterDisplayClass (char *name, int length) { int i; @@ -561,24 +572,6 @@ XdmcpRegisterDisplayClass (char *name, int length) DisplayClass.data[i] = (CARD8) name[i]; } -/* - * Register the Manufacturer display ID - */ - -static ARRAY8 ManufacturerDisplayID; - -void -XdmcpRegisterManufacturerDisplayID (char *name, int length) -{ - int i; - - XdmcpDisposeARRAY8 (&ManufacturerDisplayID); - if (!XdmcpAllocARRAY8 (&ManufacturerDisplayID, length)) - return; - for (i = 0; i < length; i++) - ManufacturerDisplayID.data[i] = (CARD8) name[i]; -} - /* * initialize XDMCP; create the socket, compute the display * number, set up the state machine @@ -867,7 +860,7 @@ send_packet(void) * timeouts, or Keepalive failure. */ -void +static void XdmcpDeadSession (char *reason) { ErrorF ("XDM: %s, declaring session dead\n", reason); @@ -960,21 +953,16 @@ restart(void) send_packet(); } -int -XdmcpCheckAuthentication ( - ARRAY8Ptr Name, - ARRAY8Ptr Data, - int packet_type) +static int +XdmcpCheckAuthentication (ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type) { return (XdmcpARRAY8Equal (Name, AuthenticationName) && (AuthenticationName->length == 0 || (*AuthenticationFuncs->Validator) (AuthenticationData, Data, packet_type))); } -int -XdmcpAddAuthorization ( - ARRAY8Ptr name, - ARRAY8Ptr data) +static int +XdmcpAddAuthorization (ARRAY8Ptr name, ARRAY8Ptr data) { AddAuthorFunc AddAuth; |