]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/dest-localization.c
Sync up with CUPS 1.7svn-r10893
[thirdparty/cups.git] / cups / dest-localization.c
index fb52a9a69010f67f28ed390bf3bd138a2bb40f32..fefb0f9e20cf1b75fd4bf1875ed112059155fb0f 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Destination localization support for CUPS.
  *
- *   Copyright 2012 by Apple Inc.
+ *   Copyright 2012-2013 by Apple Inc.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Apple Inc. and are protected by Federal copyright
@@ -178,7 +178,7 @@ cups_create_localizations(
   if (httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[0].string.text,
                       scheme, sizeof(scheme), userpass, sizeof(userpass),
                       hostname, sizeof(hostname), &port, resource,
-                      sizeof(resource)) < HTTP_URI_OK)
+                      sizeof(resource)) < HTTP_URI_STATUS_OK)
   {
     DEBUG_printf(("4cups_create_localizations: Bad printer-strings-uri value "
                   "\"%s\".", attr->values[0].string.text));
@@ -203,11 +203,12 @@ cups_create_localizations(
     */
 
     if (!strcmp(scheme, "https"))
-      encryption = HTTP_ENCRYPT_ALWAYS;
+      encryption = HTTP_ENCRYPTION_ALWAYS;
     else
-      encryption = HTTP_ENCRYPT_IF_REQUESTED;
+      encryption = HTTP_ENCRYPTION_IF_REQUESTED;
 
-    if ((http2 = httpConnectEncrypt(hostname, port, encryption)) == NULL)
+    if ((http2 = httpConnect2(hostname, port, NULL, AF_UNSPEC, encryption, 1,
+                              30000, NULL)) == NULL)
     {
       DEBUG_printf(("4cups_create_localizations: Unable to connect to "
                     "%s:%d: %s", hostname, port, cupsLastErrorString()));
@@ -233,7 +234,7 @@ cups_create_localizations(
   DEBUG_printf(("4cups_create_localizations: GET %s = %s", resource,
                 httpStatus(status)));
 
-  if (status == HTTP_OK)
+  if (status == HTTP_STATUS_OK)
   {
    /*
     * Got the file, read it...