diff options
author | Michael R Sweet <michaelrsweet@gmail.com> | 2016-11-15 12:12:05 -0500 |
---|---|---|
committer | Michael R Sweet <michaelrsweet@gmail.com> | 2016-11-15 12:12:05 -0500 |
commit | f5cffc18d1c9ca808707dacf7d1d88ba5dab5c02 (patch) | |
tree | 5304d44de86c67b8feaa905aa438d04b44bc71e8 /backend/socket.c | |
parent | 0fa88e19c45f37d89a7d6451f40d8d47dd2a6eb5 (diff) | |
download | cups-f5cffc18d1c9ca808707dacf7d1d88ba5dab5c02.tar.gz |
Add address logging to network backends (<rdar://problem/29268474>)
Diffstat (limited to 'backend/socket.c')
-rw-r--r-- | backend/socket.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/backend/socket.c b/backend/socket.c index e51582394..7fc0880f1 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -1,7 +1,7 @@ /* * AppSocket backend for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2016 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -69,7 +69,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ int contimeout; /* Connection timeout */ int waiteof; /* Wait for end-of-file? */ int port; /* Port number */ - char portname[255]; /* Port name */ int delay; /* Delay for retries... */ int device_fd; /* AppSocket */ int error; /* Error code (if any) */ @@ -264,23 +263,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ start_time = time(NULL); - sprintf(portname, "%d", port); - - fputs("STATE: +connecting-to-device\n", stderr); - fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname); - - while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL) - { - _cupsLangPrintFilter(stderr, "INFO", - _("Unable to locate printer \"%s\"."), hostname); - sleep(10); - - if (getenv("CLASS") != NULL) - { - fputs("STATE: -connecting-to-device\n", stderr); - return (CUPS_BACKEND_STOP); - } - } + addrlist = backendLookup(hostname, port, NULL); /* * See if the printer supports SNMP... |