aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/ctl.c22
-rw-r--r--src/pies.h16
3 files changed, 21 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 1ee26ec..d1bb2a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,3 +1,3 @@
1# This file is part of GNU Pies. -*- autoconf -*- 1# This file is part of GNU Pies. -*- autoconf -*-
2# Copyright (C) 2009-2015 Sergey Poznyakoff 2# Copyright (C) 2009-2016 Sergey Poznyakoff
3# 3#
@@ -17,3 +17,3 @@
17AC_PREREQ([2.63]) 17AC_PREREQ([2.63])
18AC_INIT([GNU Pies], [1.2.91], [bug-pies@gnu.org.ua]) 18AC_INIT([GNU Pies], [1.2.92], [bug-pies@gnu.org.ua])
19AC_CONFIG_SRCDIR([src/pies.h]) 19AC_CONFIG_SRCDIR([src/pies.h])
diff --git a/src/ctl.c b/src/ctl.c
index 4f56923..f7e46d0 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -657,18 +657,10 @@ ctlio_finalize_reply (struct ctlio *io)
657 657
658 if (io->state & (CTL_INITIAL_STATE|CTL_AUTHENTICATED_STATE)) 658 val = http_get_header (io->input.headers, "connection");
659 if (val)
659 { 660 {
660 if (io->code / 100 == 2 || io->code == 401) 661 if (strcasecmp (val, "keep-alive") == 0)
661 { 662 /* nothing */;
662 val = http_get_header (io->input.headers, "connection"); 663 else if (strcasecmp (val, "close") == 0)
663 if (val)
664 {
665 if (strcasecmp (val, "keep-alive") == 0)
666 /* nothing */;
667 else if (strcasecmp (val, "close") == 0)
668 io->state = CTL_END_STATE;
669 //FIXME: else?
670 }
671 }
672 else
673 io->state = CTL_END_STATE; 664 io->state = CTL_END_STATE;
665 //FIXME: else?
674 } 666 }
@@ -1186,3 +1178,3 @@ ctl_open ()
1186 logmsg (LOG_CRIT, "can't listen on control socket %s: %s", 1178 logmsg (LOG_CRIT, "can't listen on control socket %s: %s",
1187 strerror (errno)); 1179 control.url->string, strerror (errno));
1188 exit (EX_UNAVAILABLE); 1180 exit (EX_UNAVAILABLE);
diff --git a/src/pies.h b/src/pies.h
index 4bc57bd..34f1250 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -421,4 +421,12 @@ void diag_setup (int flags);
421 421
422void logmsg (int prio, const char *fmt, ...); 422#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
423void logmsg_printf (int prio, const char *fmt, ...); 423# define __attribute__(x)
424#endif
425
426#ifndef PIES_PRINTFLIKE
427# define PIES_PRINTFLIKE(fmt,narg) __attribute__ ((__format__ (__printf__, fmt, narg)))
428#endif
429
430void logmsg (int prio, const char *fmt, ...) PIES_PRINTFLIKE(2,3);
431void logmsg_printf (int prio, const char *fmt, ...) PIES_PRINTFLIKE(2,3);
424void logmsg_vprintf (int prio, const char *fmt, va_list ap); 432void logmsg_vprintf (int prio, const char *fmt, va_list ap);
@@ -427,3 +435,3 @@ extern unsigned debug_level;
427extern int source_info_option; 435extern int source_info_option;
428void debug_msg (const char *fmt, ...); 436void debug_msg (const char *fmt, ...) PIES_PRINTFLIKE(1,2);
429 437
@@ -434,3 +442,3 @@ void debug_msg (const char *fmt, ...);
434 if (source_info_option) \ 442 if (source_info_option) \
435 logmsg_printf (LOG_DEBUG, "%s:%lu:%s: ", \ 443 logmsg_printf (LOG_DEBUG, "%s:%d:%s: ", \
436 __FILE__, __LINE__, __FUNCTION__); \ 444 __FILE__, __LINE__, __FUNCTION__); \

Return to:

Send suggestions and report system problems to the System administrator.