From 8258901dd6ce8fa2b0ce7878bae1bc26f0f4ea29 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 21 Apr 2004 18:57:38 +0000 Subject: [PATCH] fewer #includes git-svn-id: https://modwaklog.svn.sourceforge.net/svnroot/modwaklog/trunk/modwaklog@20 0d961d1b-a432-0410-8fea-cc29f225fe07 --- mod_waklog.c | 70 ++++++---------------------------------------------- 1 file changed, 7 insertions(+), 63 deletions(-) diff --git a/mod_waklog.c b/mod_waklog.c index 6b48ac6..32a1266 100644 --- a/mod_waklog.c +++ b/mod_waklog.c @@ -12,14 +12,18 @@ #include #endif /* sun */ #include +#if 0 #include #include +#endif /* 0 */ #include #include #include +#if 0 #include #include +#endif /* 0 */ #define KEYTAB "/home/drh/keytab.umweb.drhtest" #define KEYTAB_PRINCIPAL "umweb/drhtest" @@ -55,57 +59,6 @@ typedef struct { } waklog_child_config; waklog_child_config child; -void -bin_dump( char *s, char *cp, int count ) -{ - char *buffer; - char c; - int w; - int i; - long o; - - o = 0; - buffer = cp; - while ( count > 0 ) { - c = 16; - if (c > count) { - c = count; - } - sprintf( s, "%05lx:", o); - s += strlen(s); - w = 0; - for (i = 0; i < c/2; ++i) { - w += 5; - sprintf( s, " %04x", ((unsigned short *)buffer)[i]); - s += strlen(s); - } - if (c & 1) { - w += 3; - sprintf( s, " %02x", buffer[c-1]); - s += strlen(s); - } - while (w < 41) { - ++w; - sprintf( s, "%c", ' '); - s += strlen(s); - } - for (i = 0; i < c; ++i) { - if (isprint(buffer[i])) { - sprintf( s, "%c", buffer[i]); - } else { - sprintf( s, "."); - } - s += strlen(s); - } - sprintf( s, "\n" ); - s += strlen(s); - o += c; - buffer += c; - count -= c; - } - sprintf( s, "%05lx:\0", o ); -} - static void * waklog_create_dir_config( pool *p, char *path ) @@ -487,12 +440,6 @@ waklog_aklog( request_rec *r ) token.ticketLen = v5credsp->ticket.length; memmove( token.ticket, v5credsp->ticket.data, token.ticketLen ); - /* - ** bin_dump( buf, (char *) &token, token.ticketLen + 24 ); - ** ap_log_error( APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, - ** "mod_waklog: token\n%s", buf ); - */ - /* make sure we have to do this */ if ( child.token.kvno != token.kvno || child.token.ticketLen != token.ticketLen || @@ -500,17 +447,14 @@ waklog_aklog( request_rec *r ) sizeof( token.sessionKey ) )) || (memcmp( child.token.ticket, token.ticket, token.ticketLen )) ) { - /* - ** bin_dump( buf, (char *) &child.token, child.token.ticketLen + 24 ); - ** ap_log_error( APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, - ** "mod_waklog: child.token\n%s", buf ); - */ + ap_log_error( APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, + "mod_waklog: client: %s", buf ); /* build the name */ memmove( buf, v5credsp->client->data[0].data, v5credsp->client->data[0].length ); buf[ v5credsp->client->data[0].length ] = '\0'; if ( v5credsp->client->length > 1 ) { - strncat( buf, ".", sizeof( buf ) - strlen( buf ) - 1 ); + strncat( buf, ".", sizeof( buf ) - strlen( buf ) - 1 ); buflen = strlen( buf ); memmove( buf + buflen, v5credsp->client->data[1].data, v5credsp->client->data[1].length ); buf[ buflen + v5credsp->client->data[1].length ] = '\0'; -- 2.20.1