Репозитории ALT
S: | 1.8.0-alt1 |
5.1: | 1.4.1-alt30 |
4.1: | 1.4.1-alt28 |
4.0: | 1.4.1-alt27 |
3.0: | 1.4.1-alt20 |
Группа :: Система/Ядро и оборудование
Пакет: sysklogd
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: sysklogd-1.4.2-rh-alt-alpha.patch
Скачать
Скачать
--- sysklogd/syslogd.c.orig 2004-08-09 21:06:04 +0400
+++ sysklogd/syslogd.c 2004-08-09 21:10:54 +0400
@@ -664,8 +664,8 @@ struct filed {
* in seconds after previous message is logged. After each flush,
* we move to the next interval until we reach the largest.
*/
-int repeatinterval[] = { 30, 60 }; /* # of secs before flush */
-#define MAXREPEAT ((sizeof(repeatinterval) / sizeof(repeatinterval[0])) - 1)
+time_t repeatinterval[] = { 30, 60 }; /* # of secs before flush */
+#define MAXREPEAT ((int) ((sizeof(repeatinterval) / sizeof(repeatinterval[0])) - 1))
#define REPEATTIME(f) ((f)->f_time + repeatinterval[(f)->f_repeatcount])
#define BACKOFF(f) { if (++(f)->f_repeatcount > MAXREPEAT) \
(f)->f_repeatcount = MAXREPEAT; \
@@ -770,7 +770,7 @@ int main(int argc, char **argv);
char **crunch_list(char *list);
int usage(void);
void untty(void);
-void printchopped(const char *hname, char *msg, int len, int fd);
+void printchopped(const char *hname, char *msg, size_t len, int fd);
void printline(const char *hname, char *msg);
void printsys(char *msg);
void logmsg(int pri, char *msg, const char *from, int flags);
@@ -1368,7 +1368,7 @@ void untty()
void printchopped(hname, msg, len, fd)
const char *hname;
char *msg;
- int len;
+ size_t len;
int fd;
{
auto int ptlngth;
@@ -1635,9 +1635,9 @@ void logmsg(pri, msg, from, flags)
!strcmp(from, f->f_prevhost)) {
(void) strncpy(f->f_lasttime, timestamp, 15);
f->f_prevcount++;
- dprintf("msg repeated %d times, %ld sec of %d.\n",
+ dprintf("msg repeated %d times, %ld sec of %ld.\n",
f->f_prevcount, now - f->f_time,
- repeatinterval[f->f_repeatcount]);
+ (long)repeatinterval[f->f_repeatcount]);
/*
* If domark would have logged this by now,
* flush it now (so we don't hold isolated messages),
@@ -2108,9 +2108,9 @@ void domark()
for (f = Files; f; f = f->f_next) {
#endif
if (f->f_prevcount && now >= REPEATTIME(f)) {
- dprintf("flush %s: repeated %d times, %d sec.\n",
+ dprintf("flush %s: repeated %d times, %ld sec.\n",
TypeNames[f->f_type], f->f_prevcount,
- repeatinterval[f->f_repeatcount]);
+ (long)repeatinterval[f->f_repeatcount]);
fprintlog(f, LocalHostName, 0, (char *)NULL);
BACKOFF(f);
}