=== modified file 'src/acl/UserData.cc' --- src/acl/UserData.cc 2012-09-01 14:38:36 +0000 +++ src/acl/UserData.cc 2013-01-21 15:05:35 +0000 @@ -132,10 +132,10 @@ if (strcmp("-i", t) == 0) { debugs(28, 5, "aclParseUserList: Going case-insensitive"); - flags.case_insensitive = 1; + flags.case_insensitive = true; } else if (strcmp("REQUIRED", t) == 0) { debugs(28, 5, "aclParseUserList: REQUIRED-type enabled"); - flags.required = 1; + flags.required = true; } else { if (flags.case_insensitive) Tolower(t); === modified file 'src/acl/UserData.h' --- src/acl/UserData.h 2012-09-01 14:38:36 +0000 +++ src/acl/UserData.h 2013-01-21 15:02:44 +0000 @@ -53,8 +53,8 @@ SplayNode *names; struct { - unsigned int case_insensitive:1; - unsigned int required:1; + bool case_insensitive; + bool required; } flags; }; === modified file 'src/anyp/PortCfg.h' --- src/anyp/PortCfg.h 2012-10-09 23:15:44 +0000 +++ src/anyp/PortCfg.h 2013-01-21 16:22:10 +0000 @@ -29,24 +29,24 @@ char *name; /* visible name */ char *defaultsite; /* default web site */ - unsigned int intercepted:1; /**< intercepting proxy port */ - unsigned int spoof_client_ip:1; /**< spoof client ip if possible */ - unsigned int accel:1; /**< HTTP accelerator */ - unsigned int allow_direct:1; /**< Allow direct forwarding in accelerator mode */ - unsigned int vhost:1; /**< uses host header */ - unsigned int sslBump:1; /**< intercepts CONNECT requests */ - unsigned int actAsOrigin:1; ///< update replies to conform with RFC 2616 - unsigned int ignore_cc:1; /**< Ignore request Cache-Control directives */ + bool intercepted; ///< intercepting proxy port + bool spoof_client_ip; ///< spoof client ip if possible + bool accel; ///< HTTP accelerator + bool allow_direct; ///< Allow direct forwarding in accelerator mode + bool vhost; ///< uses host header + bool sslBump; ///< intercepts CONNECT requests + bool actAsOrigin; ///< update replies to conform with RFC 2616 + bool ignore_cc; ///< Ignore request Cache-Control directives - int vport; /* virtual port support, -1 for dynamic, >0 static*/ + int vport; ///< virtual port support, -1 dynamic, >0 static bool connection_auth_disabled; /* Don't support connection oriented auth */ int disable_pmtu_discovery; struct { - unsigned int enabled; unsigned int idle; unsigned int interval; unsigned int timeout; + bool enabled; } tcp_keepalive; /** === modified file 'src/cache_cf.cc' --- src/cache_cf.cc 2012-12-27 18:15:38 +0000 +++ src/cache_cf.cc 2013-01-21 16:21:57 +0000 @@ -3520,13 +3520,14 @@ debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: Accelerator mode requires its own port. It cannot be shared with other modes."); self_destruct(); } - s->accel = s->vhost = 1; + s->accel = true; + s->vhost = true; } else if (strcmp(token, "transparent") == 0 || strcmp(token, "intercept") == 0) { if (s->accel || s->spoof_client_ip) { debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: Intercept mode requires its own interception port. It cannot be shared with other modes."); self_destruct(); } - s->intercepted = 1; + s->intercepted = true; Ip::Interceptor.StartInterception(); /* Log information regarding the port modes under interception. */ debugs(3, DBG_IMPORTANT, "Starting Authentication on port " << s->s); @@ -3544,7 +3545,7 @@ debugs(3,DBG_CRITICAL, "FATAL: http(s)_port: TPROXY option requires its own interception port. It cannot be shared with other modes."); self_destruct(); } - s->spoof_client_ip = 1; + s->spoof_client_ip = true; Ip::Interceptor.StartTransparency(); /* Log information regarding the port modes under transparency. */ debugs(3, DBG_IMPORTANT, "Starting IP Spoofing on port " << s->s); @@ -3566,12 +3567,13 @@ if (!s->accel) { debugs(3, DBG_CRITICAL, "WARNING: http(s)_port: vhost option is deprecated. Use 'accel' mode flag instead."); } - s->accel = s->vhost = 1; + s->accel = true; + s->vhost = true; } else if (strcmp(token, "no-vhost") == 0) { if (!s->accel) { debugs(3, DBG_IMPORTANT, "ERROR: http(s)_port: no-vhost option requires Acceleration mode flag."); } - s->vhost = 0; + s->vhost = false; } else if (strcmp(token, "vport") == 0) { if (!s->accel) { debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: vport option requires Acceleration mode flag."); @@ -3595,12 +3597,12 @@ debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: allow-direct option requires Acceleration mode flag."); self_destruct(); } - s->allow_direct = 1; + s->allow_direct = true; } else if (strcmp(token, "act-as-origin") == 0) { if (!s->accel) { debugs(3, DBG_IMPORTANT, "ERROR: http(s)_port: act-as-origin option requires Acceleration mode flag."); } else - s->actAsOrigin = 1; + s->actAsOrigin = true; } else if (strcmp(token, "ignore-cc") == 0) { #if !USE_HTTP_VIOLATIONS if (!s->accel) { @@ -3608,7 +3610,7 @@ self_destruct(); } #endif - s->ignore_cc = 1; + s->ignore_cc = true; } else if (strncmp(token, "name=", 5) == 0) { safe_free(s->name); s->name = xstrdup(token + 5); @@ -3635,10 +3637,10 @@ self_destruct(); } } else if (strcmp(token, "tcpkeepalive") == 0) { - s->tcp_keepalive.enabled = 1; + s->tcp_keepalive.enabled = true; } else if (strncmp(token, "tcpkeepalive=", 13) == 0) { char *t = token + 13; - s->tcp_keepalive.enabled = 1; + s->tcp_keepalive.enabled = true; s->tcp_keepalive.idle = atoi(t); t = strchr(t, ','); if (t) { @@ -3655,9 +3657,9 @@ } else if (strcasecmp(token, "sslBump") == 0) { debugs(3, DBG_CRITICAL, "WARNING: '" << token << "' is deprecated " << "in http_port. Use 'ssl-bump' instead."); - s->sslBump = 1; // accelerated when bumped, otherwise not + s->sslBump = true; // accelerated when bumped, otherwise not } else if (strcmp(token, "ssl-bump") == 0) { - s->sslBump = 1; // accelerated when bumped, otherwise not + s->sslBump = true; // accelerated when bumped, otherwise not } else if (strncmp(token, "cert=", 5) == 0) { safe_free(s->cert); s->cert = xstrdup(token + 5); === modified file 'src/client_side.cc' --- src/client_side.cc 2013-01-18 05:57:22 +0000 +++ src/client_side.cc 2013-01-21 15:54:31 +0000 @@ -2025,7 +2025,7 @@ static void prepareAcceleratedURL(ConnStateData * conn, ClientHttpRequest *http, char *url, const char *req_hdr) { - int vhost = conn->port->vhost; + const bool vhost = conn->port->vhost; int vport = conn->port->vport; char *host; char ipbuf[MAX_IPSTRLEN]; @@ -4030,12 +4030,12 @@ #if USE_SSL if (s->sslBump && !Config.accessList.ssl_bump) { debugs(33, DBG_IMPORTANT, "WARNING: No ssl_bump configured. Disabling ssl-bump on " << s->protocol << "_port " << s->s); - s->sslBump = 0; + s->sslBump = false; } if (s->sslBump && !s->staticSslContext && !s->generateHostCertificates) { debugs(1, DBG_IMPORTANT, "Will not bump SSL at http_port " << s->s << " due to SSL initialization failure."); - s->sslBump = 0; + s->sslBump = false; } if (s->sslBump) { // Create ssl_ctx cache for this port. @@ -4085,12 +4085,12 @@ // TODO: merge with similar code in clientHttpConnectionsOpen() if (s->sslBump && !Config.accessList.ssl_bump) { debugs(33, DBG_IMPORTANT, "WARNING: No ssl_bump configured. Disabling ssl-bump on " << s->protocol << "_port " << s->s); - s->sslBump = 0; + s->sslBump = false; } if (s->sslBump && !s->staticSslContext && !s->generateHostCertificates) { debugs(1, DBG_IMPORTANT, "Will not bump SSL at http_port " << s->s << " due to SSL initialization failure."); - s->sslBump = 0; + s->sslBump = false; } if (s->sslBump) {