From: Adam Dickmeiss Date: Thu, 30 Dec 2004 00:25:20 +0000 (+0000) Subject: Cast PIDs to longs so they can be printfd X-Git-Tag: YAZ.2.0.30~9 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=b8cceb769510f6f0ebaac93e6b056de7950c53e8;p=yaz-moved-to-github.git Cast PIDs to longs so they can be printfd --- diff --git a/src/seshigh.c b/src/seshigh.c index 1d04a22..025b16f 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.41 2004-12-22 23:48:34 adam Exp $ + * $Id: seshigh.c,v 1.42 2004-12-30 00:25:33 adam Exp $ */ /** * \file seshigh.c @@ -171,7 +171,7 @@ association *create_association(IOCHAN channel, COMSTACK link) } else { - sprintf(filename + strlen(filename), ".%d", getpid()); + sprintf(filename + strlen(filename), ".%ld", (long)getpid()); if (!(f = fopen(filename, "w"))) { yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", filename); @@ -1033,7 +1033,7 @@ static void process_http_request(association *assoc, request *req) int t; const char *alive = z_HTTP_header_lookup(hreq->headers, "Keep-Alive"); - if (alive && isdigit(*alive)) + if (alive && isdigit(*(const unsigned char *) alive)) t = atoi(alive); else t = 15; @@ -1429,7 +1429,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->implementation_name, odr_prepend(assoc->encode, "GFS", resp->implementationName)); - version = odr_strdup(assoc->encode, "$Revision: 1.41 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.42 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, diff --git a/src/statserv.c b/src/statserv.c index fc9b7fc..d28298a 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -5,7 +5,7 @@ * NT threaded server code by * Chas Woodfield, Fretwell Downing Informatics. * - * $Id: statserv.c,v 1.14 2004-12-22 23:47:11 adam Exp $ + * $Id: statserv.c,v 1.15 2004-12-30 00:25:20 adam Exp $ */ /** @@ -539,8 +539,8 @@ static void *new_session (void *vp) #else a = 0; #endif - yaz_log(log_session, "Starting session %d from %s (pid=%d)", - no_sessions, a ? a : "[Unknown]", getpid()); + yaz_log(log_session, "Starting session %d from %s (pid=%ld)", + no_sessions, a ? a : "[Unknown]", (long) getpid()); if (max_sessions && no_sessions >= max_sessions) control_block.one_shot = 1; if (control_block.threads) @@ -754,7 +754,8 @@ int statserv_start(int argc, char **argv) fclose(f); } - yaz_log (log_server, "Starting server %s pid=%d", programname, getpid()); + yaz_log (log_server, "Starting server %s pid=%ld", programname, + (long) getpid()); #if 0 sigset_t sigs_to_block;