]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The scheduler no longer looks up the local hostname by default; turn on hostname
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 15 Jan 2009 00:59:02 +0000 (00:59 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 15 Jan 2009 00:59:02 +0000 (00:59 +0000)
lookups to restore the previous behavior.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@8257 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.3.txt
scheduler/client.c
scheduler/client.h
scheduler/listen.c
scheduler/network.c

index b57dbf20cbb6b809a2d2fa9b7b8a9acc24938ed9..dd82fb724025a413e30f1cd5da503c5213db2cf0 100644 (file)
@@ -5,6 +5,8 @@ CHANGES IN CUPS V1.3.10
 
        - 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)
index 7e8e9da07af8e4f25bbfbd83f955c2afdadd1767..9a47ff0a91d5a07b96273b114cc47b8ca311d6f3 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   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
@@ -283,16 +283,7 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
     * 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
index 431dbfd48402b00fbfed608adad329a286cf0542..c06807e5efa42ba3a82bfa88833a35adac1cdd7f 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   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
@@ -98,8 +98,6 @@ VAR cups_array_t      *Clients        VALUE(NULL),
                                        /* 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);
index c41b94cc63d68bb223b9240b0eb026a7bc9452ce..474d07dfc91bd051e180e3dbb089ece66511f786 100644 (file)
@@ -4,7 +4,7 @@
  *   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
@@ -142,23 +142,6 @@ cupsdStartListening(void)
   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...
   */
index 70ea2e052ef885f6f001bf86ed39cdb9c35c69aa..2d6f37d967d76e4a79225839638f42adbab9dfb1 100644 (file)
@@ -4,7 +4,7 @@
  *   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
@@ -169,17 +169,8 @@ cupsdNetIFUpdate(void)
       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));
     }
 
    /*