Make sure csp flags have unique values
authorFabian Keil <fk@fabiankeil.de>
Wed, 12 Nov 2014 12:00:41 +0000 (12:00 +0000)
committerFabian Keil <fk@fabiankeil.de>
Wed, 12 Nov 2014 12:00:41 +0000 (12:00 +0000)
Previously CSP_FLAG_CRUNCHED and CSP_FLAG_CLIENT_CONNECTION_HEADER_SET
shared the same bit which obviously wasn't intentional.

The only negative effect was that Privoxy potentially reused less
connections than it could have, which explains why the problem hasn't
been noticed for seven years and was only found by manual code
inspection.

project.h

index 2b0c606..3f9b5f1 100644 (file)
--- a/project.h
+++ b/project.h
@@ -1,7 +1,7 @@
 #ifndef PROJECT_H_INCLUDED
 #define PROJECT_H_INCLUDED
 /** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.206 2014/06/02 06:22:21 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.207 2014/07/25 11:55:11 fabiankeil Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/project.h,v $
@@ -726,11 +726,6 @@ struct reusable_connection
  */
 #define CSP_FLAG_TOGGLED_ON 0x20U
 
-/**
- * Flag for csp->flags: Set if we answered the request ourselve.
- */
-#define CSP_FLAG_CRUNCHED   0x40U
-
 /**
  * Flag for csp->flags: Set if an acceptable Connection header
  * has already been set by the client.
@@ -853,6 +848,12 @@ struct reusable_connection
  */
 #define CSP_FLAG_UNSUPPORTED_CLIENT_EXPECTATION     0x02000000U
 
+/**
+ * Flag for csp->flags: Set if we answered the request ourselve.
+ */
+#define CSP_FLAG_CRUNCHED                           0x04000000U
+
+
 /*
  * Flags for use in return codes of child processes
  */