*
* 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
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));
*/
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()));
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...