]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/tls-sspi.c
Clean up implementation for SSLOptions
[thirdparty/cups.git] / cups / tls-sspi.c
index 77b883b2297622eb03ffebccf5fac6fee1642b1b..80c8cfe1257217a612fc0121ef29035191a1a3b6 100644 (file)
@@ -52,7 +52,7 @@
  * Local globals...
  */
 
-static int             tls_options = -1;/* Options for TLS connections */
+static unsigned int tls_options = _HTTP_TLS_NONE; /* Options for TLS connections */
 
 
 /*
@@ -911,7 +911,7 @@ _httpTLSRead(http_t *http,          /* I - HTTP connection */
  */
 
 void
-_httpTLSSetOptions(int options)                /* I - Options */
+_httpTLSSetOptions(unsigned int options)               /* I - Options */
 {
   tls_options = options;
 }
@@ -930,7 +930,7 @@ _httpTLSStart(http_t *http)         /* I - HTTP connection */
 
   DEBUG_printf(("3_httpTLSStart(http=%p)", http));
 
-  if (tls_options < 0)
+  if ((tls_options == _HTTP_TLS_UNCHANGED) || (tls_options == _HTTP_TLS_NONE))
   {
     DEBUG_puts("4_httpTLSStart: Setting defaults.");
     _cupsSetDefaults();