INN commit: branches/2.5 (4 files)
INN Commit
rra at isc.org
Thu Dec 12 20:24:20 UTC 2013
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 ;
More information about the inn-committers
mailing list