diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-08-27 22:04:19 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-08-27 22:04:19 +0000 |
commit | 5f64df29828e9ca71164342efd357e9debfb6e44 (patch) | |
tree | e84251656a361f5daa45b994035da31410f5b5aa /backend/socket.c | |
parent | 247efae55fc4aeeb5ab97fd3e8e56fc9cd4b0706 (diff) | |
download | cups-5f64df29828e9ca71164342efd357e9debfb6e44.tar.gz |
Merge changes from CUPS 1.4svn-r7874.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@924 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'backend/socket.c')
-rw-r--r-- | backend/socket.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/backend/socket.c b/backend/socket.c index 4e2dac146..70a089195 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -72,7 +72,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ sep; /* Option separator */ int print_fd; /* Print file */ int copies; /* Number of copies to print */ - time_t start_time; /* Time of first connect */ + time_t start_time, /* Time of first connect */ + wait_time; /* Time to wait before shutting down socket */ int recoverable; /* Recoverable error shown? */ int contimeout; /* Connection timeout */ int waiteof; /* Wait for end-of-file? */ @@ -412,10 +413,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ } /* - * Get any pending back-channel data... + * Wait up to 5 seconds to get any pending back-channel data... */ - while (wait_bc(device_fd, 5) > 0); + wait_time = time(NULL) + 5; + while (wait_time >= time(NULL)) + if (wait_bc(device_fd, 1) <= 0) + break; if (waiteof) { |