Cosmetics: Killed a warning, a typo and an allocation left at exit
authoroes <oes@users.sourceforge.net>
Thu, 8 May 2003 15:13:46 +0000 (15:13 +0000)
committeroes <oes@users.sourceforge.net>
Thu, 8 May 2003 15:13:46 +0000 (15:13 +0000)
jcc.c

diff --git a/jcc.c b/jcc.c
index d749697..5707d5c 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.8 2003/03/31 13:12:32 oes Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.9 2003/04/03 15:08:42 oes Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/Attic/jcc.c,v $
@@ -33,6 +33,10 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.8 2003/03/31 13:12:32 oes Exp $";
  *
  * Revisions   :
  *    $Log: jcc.c,v $
+ *    Revision 1.92.2.9  2003/04/03 15:08:42  oes
+ *    No longer rely on non-POSIX.1 extensions of getcwd().
+ *    Fixes bug #711001
+ *
  *    Revision 1.92.2.8  2003/03/31 13:12:32  oes
  *    Replaced setenv() by posix-compliant putenv()
  *    Thanks to Neil McCalden (nmcc AT users.sf.net).
@@ -703,7 +707,7 @@ pthread_mutex_t gethostbyname_mutex;
 #endif /* def OSX_DARWIN */
 
 #if defined(unix) || defined(__EMX__)
-const char *basedir;
+const char *basedir = NULL;
 const char *pidfile = NULL;
 int received_hup_signal = 0;
 #endif /* defined unix */
@@ -1475,7 +1479,7 @@ static void chat(struct client_state *csp)
 
                   if (write_socket(csp->cfd, hdr, hdrlen)
                    || ((flushed = flush_socket(csp->cfd, csp)) < 0)
-                   || (write_socket(csp->cfd, buf, len)))
+                   || (write_socket(csp->cfd, buf, (size_t) len)))
                   {
                      log_error(LOG_LEVEL_CONNECT, "Flush header and buffers to client failed: %E");
 
@@ -1898,6 +1902,8 @@ int main(int argc, const char *argv[])
    pthread_mutex_init(&gethostbyname_mutex,0);
 #endif /* def OSX_DARWIN */
 
+   pthread_mutex_init(&inet_ntoa_mutex, 0);
+
    /*
     * Unix signal handling
     *
@@ -2382,7 +2388,7 @@ static void listen_loop(void)
             serve(csp);
 
             /* 
-             * If we've been toggled or we'be blocked the request, tell Mom
+             * If we've been toggled or we've blocked the request, tell Mom
              */
 
 #ifdef FEATURE_TOGGLE
@@ -2495,12 +2501,14 @@ static void listen_loop(void)
    sweep();
 
 #if defined(unix)
-   free(basedir);
+   freez(basedir);
 #endif
 #if defined(_WIN32) && !defined(_WIN_CONSOLE)
    /* Cleanup - remove taskbar icon etc. */
    TermLogWindow();
 #endif
+   freez(configfile);
+
 
    exit(0);
 #endif /* FEATURE_GRACEFUL_TERMINATION */