- Documentation fixes (STR #2994, STR #2995, STR #3008, STR #3056,
STR #3057)
+ - The scheduler no longer looks up the local hostname by default;
+ turn on hostname lookups to restore the previous behavior.
- The scheduler did not always load MIME type rules correctly
(STR #3059)
- The test page did not format correctly on A4 paper (STR #3060)
*
* Client routines for the Common UNIX Printing System (CUPS) scheduler.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
* Map accesses from the same host to the server name.
*/
- for (addr = ServerAddrs; addr; addr = addr->next)
- if (httpAddrEqual(con->http.hostaddr, &(addr->addr)))
- break;
-
- if (addr)
- {
- strlcpy(con->http.hostname, ServerName, sizeof(con->http.hostname));
- hostname = con->http.hostname;
- }
- else if (HostNameLookups)
+ if (HostNameLookups)
hostname = httpAddrLookup(con->http.hostaddr, con->http.hostname,
sizeof(con->http.hostname));
else
*
* Client definitions for the Common UNIX Printing System (CUPS) scheduler.
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
/* HTTP clients */
*ActiveClients VALUE(NULL);
/* Active HTTP clients */
-VAR http_addrlist_t *ServerAddrs VALUE(NULL);
- /* Server address(es) */
VAR char *ServerHeader VALUE(NULL);
/* Server header in requests */
VAR int CGIPipes[2] VALUE2(-1,-1);
* Server listening routines for the Common UNIX Printing System (CUPS)
* scheduler.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartListening: %d Listeners",
cupsArrayCount(Listeners));
- /*
- * Get the server's IP address...
- */
-
- if (ServerAddrs)
- httpAddrFreeList(ServerAddrs);
-
- if ((ServerAddrs = httpAddrGetList(ServerName, AF_UNSPEC, NULL)) == NULL)
- {
- cupsdLogMessage(CUPSD_LOG_ERROR,
- "Unable to find IP address for server name \"%s\"!",
- ServerName);
-
- if (FatalErrors & CUPSD_FATAL_LISTEN)
- cupsdEndProcess(getpid(), 0);
- }
-
/*
* Setup socket listeners...
*/
* Network interface functions for the Common UNIX Printing System
* (CUPS) scheduler.
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
if (httpAddrLocalhost((http_addr_t *)(addr->ifa_addr)))
strcpy(hostname, "localhost");
else
- {
- for (saddr = ServerAddrs; saddr; saddr = saddr->next)
- if (httpAddrEqual((http_addr_t *)(addr->ifa_addr), &(saddr->addr)))
- break;
-
- if (saddr)
- strlcpy(hostname, ServerName, sizeof(hostname));
- else
- httpAddrString((http_addr_t *)(addr->ifa_addr), hostname,
- sizeof(hostname));
- }
+ httpAddrString((http_addr_t *)(addr->ifa_addr), hostname,
+ sizeof(hostname));
}
/*