Send inn-committers mailing list submissions to
        inn-committers@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-committers
or, via email, send a message with subject or body 'help' to
        inn-committers-requ...@lists.isc.org

You can reach the person managing the list at
        inn-committers-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-committers digest..."


Today's Topics:

   1. INN commit: trunk (4 files) (INN Commit)
   2. INN commit: branches/2.5 (4 files) (INN Commit)


----------------------------------------------------------------------

Message: 1
Date: Thu, 12 Dec 2013 12:23:43 -0800 (PST)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: trunk (4 files)
Message-ID: <20131212202344.0ab6d67...@hope.eyrie.org>

    Date: Thursday, December 12, 2013 @ 12:23:43
  Author: iulius
Revision: 9583

innd:  fix a segfault when running news.daily

On systems where time_t is a 64-bit integer, innd segfaults
on "ctlinnd name" commands (for instance when news.daily
uses these commands on connected peers).

Thanks to S.P. Zeidler for the patch.

Modified:
  trunk/backends/ninpaths.c
  trunk/doc/pod/news.pod
  trunk/innd/cc.c
  trunk/innfeed/endpoint.c

---------------------+
 backends/ninpaths.c |    2 +-
 doc/pod/news.pod    |    5 +++++
 innd/cc.c           |    2 +-
 innfeed/endpoint.c  |    8 ++++----
 4 files changed, 11 insertions(+), 6 deletions(-)

Modified: backends/ninpaths.c
===================================================================
--- backends/ninpaths.c 2013-12-09 21:30:42 UTC (rev 9582)
+++ backends/ninpaths.c 2013-12-12 20:23:43 UTC (rev 9583)
@@ -147,7 +147,7 @@
     }
     fprintf(f, "!!NINP " VERSION " %lu %lu %ld %ld %ld\n",
             (unsigned long) starttime, (unsigned long) time(NULL), sites,
-            total, (long)(atimes/total)+starttime);
+            total, (long) ((atimes/total) + starttime));
     n=j=0;
     /* write the S-records (hosts), numbering them in the process */
     for (i=0; i<HASH_TBL; ++i)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod    2013-12-09 21:30:42 UTC (rev 9582)
+++ doc/pod/news.pod    2013-12-12 20:23:43 UTC (rev 9583)
@@ -206,6 +206,11 @@
 
 =item *
 
+Fixed a segfault occurring in B<innd> on systems where time_t is a
+64-bit integer.  Thanks to S<S.P. Zeidler> for the patch.
+
+=item *
+
 Fixed a regression that occurred in S<INN 2.5.3> regarding the path used
 by default by B<pullnews> for its configuration file.  Instead of looking
 in the running user's home directory, it was looking in the I<pathnews>

Modified: innd/cc.c
===================================================================
--- innd/cc.c   2013-12-09 21:30:42 UTC (rev 9582)
+++ innd/cc.c   2013-12-12 20:23:43 UTC (rev 9583)
@@ -952,7 +952,7 @@
             mode = (cp->MaxCnx > 0 && cp->ActiveCnx == 0) ? "paused" : "";
             buffer_sprintf(&CCreply, true, ":%s:%ld:%s",
                            cp->State == CScancel ? "cancel" : "nntp",
-                           (long) Now.tv_sec - cp->LastActive, mode);
+                           (long) (Now.tv_sec - cp->LastActive), mode);
            break;
        case CTlocalconn:
             buffer_sprintf(&CCreply, true, ":localconn::");

Modified: innfeed/endpoint.c
===================================================================
--- innfeed/endpoint.c  2013-12-09 21:30:42 UTC (rev 9582)
+++ innfeed/endpoint.c  2013-12-12 20:23:43 UTC (rev 9583)
@@ -502,8 +502,8 @@
   id = timerElemAdd (timeToWake,func,clientData) ;
 
 #if 0
-  d_printf (1,"Preparing wake %d at date %ld for %d seconds\n",
-           (int) id, (long) now, timeToWake - now) ;
+  d_printf (1, "Preparing wake %d at date %ld for %ld seconds\n",
+           (int) id, (long) now, (long) (timeToWake - now)) ;
 #endif
 
   return id ;
@@ -519,8 +519,8 @@
   id = timerElemAdd (now + timeToSleep,func,clientData) ;
 
 #if 0
-  d_printf (1,"Preparing sleep %d at date %ld for %d seconds\n",
-           (int) id, (long) now, timeToSleep) ;
+  d_printf (1, "Preparing sleep %d at date %ld for %ld seconds\n",
+           (int) id, (long) now, (long) timeToSleep) ;
 #endif
 
   return id ;



------------------------------

Message: 2
Date: Thu, 12 Dec 2013 12:24:20 -0800 (PST)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: branches/2.5 (4 files)
Message-ID: <20131212202420.88ef067...@hope.eyrie.org>

    Date: Thursday, December 12, 2013 @ 12:24:20
  Author: iulius
Revision: 9584

innd:  fix a segfault when running news.daily

On systems where time_t is a 64-bit integer, innd segfaults
on "ctlinnd name" commands (for instance when news.daily
uses these commands on connected peers).

Thanks to S.P. Zeidler for the patch.

Modified:
  branches/2.5/backends/ninpaths.c
  branches/2.5/doc/pod/news.pod
  branches/2.5/innd/cc.c
  branches/2.5/innfeed/endpoint.c

---------------------+
 backends/ninpaths.c |    2 +-
 doc/pod/news.pod    |    5 +++++
 innd/cc.c           |    2 +-
 innfeed/endpoint.c  |    8 ++++----
 4 files changed, 11 insertions(+), 6 deletions(-)

Modified: backends/ninpaths.c
===================================================================
--- backends/ninpaths.c 2013-12-12 20:23:43 UTC (rev 9583)
+++ backends/ninpaths.c 2013-12-12 20:24:20 UTC (rev 9584)
@@ -147,7 +147,7 @@
     }
     fprintf(f, "!!NINP " VERSION " %lu %lu %ld %ld %ld\n",
             (unsigned long) starttime, (unsigned long) time(NULL), sites,
-            total, (long)(atimes/total)+starttime);
+            total, (long) ((atimes/total) + starttime));
     n=j=0;
     /* write the S-records (hosts), numbering them in the process */
     for (i=0; i<HASH_TBL; ++i)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod    2013-12-12 20:23:43 UTC (rev 9583)
+++ doc/pod/news.pod    2013-12-12 20:24:20 UTC (rev 9584)
@@ -44,6 +44,11 @@
 
 =item *
 
+Fixed a segfault occurring in B<innd> on systems where time_t is a
+64-bit integer.  Thanks to S<S.P. Zeidler> for the patch.
+
+=item *
+
 Fixed a regression that occurred in S<INN 2.5.3> regarding the path used
 by default by B<pullnews> for its configuration file.  Instead of looking
 in the running user's home directory, it was looking in the I<pathnews>

Modified: innd/cc.c
===================================================================
--- innd/cc.c   2013-12-12 20:23:43 UTC (rev 9583)
+++ innd/cc.c   2013-12-12 20:24:20 UTC (rev 9584)
@@ -952,7 +952,7 @@
             mode = (cp->MaxCnx > 0 && cp->ActiveCnx == 0) ? "paused" : "";
             buffer_sprintf(&CCreply, true, ":%s:%ld:%s",
                            cp->State == CScancel ? "cancel" : "nntp",
-                           (long) Now.tv_sec - cp->LastActive, mode);
+                           (long) (Now.tv_sec - cp->LastActive), mode);
            break;
        case CTlocalconn:
             buffer_sprintf(&CCreply, true, ":localconn::");

Modified: innfeed/endpoint.c
===================================================================
--- innfeed/endpoint.c  2013-12-12 20:23:43 UTC (rev 9583)
+++ innfeed/endpoint.c  2013-12-12 20:24:20 UTC (rev 9584)
@@ -502,8 +502,8 @@
   id = timerElemAdd (timeToWake,func,clientData) ;
 
 #if 0
-  d_printf (1,"Preparing wake %d at date %ld for %d seconds\n",
-           (int) id, (long) now, timeToWake - now) ;
+  d_printf (1, "Preparing wake %d at date %ld for %ld seconds\n",
+           (int) id, (long) now, (long) (timeToWake - now)) ;
 #endif
 
   return id ;
@@ -519,8 +519,8 @@
   id = timerElemAdd (now + timeToSleep,func,clientData) ;
 
 #if 0
-  d_printf (1,"Preparing sleep %d at date %ld for %d seconds\n",
-           (int) id, (long) now, timeToSleep) ;
+  d_printf (1, "Preparing sleep %d at date %ld for %ld seconds\n",
+           (int) id, (long) now, (long) timeToSleep) ;
 #endif
 
   return id ;



------------------------------

_______________________________________________
inn-committers mailing list
inn-committers@lists.isc.org
https://lists.isc.org/mailman/listinfo/inn-committers

End of inn-committers Digest, Vol 58, Issue 3
*********************************************

Reply via email to