Signalize that CUPS connection is available when EISCONN occurs

Add test for EISCONN error when testing whether a connection to CUPS server
is available (#576678 - patch by mark@ecs.vuw.ac.nz).

Signed-off-by: Marek Kasik <mkasik@redhat.com>
This commit is contained in:
mark@ecs.vuw.ac.nz
2009-05-19 16:08:21 +02:00
committed by Matthias Clasen
parent 13530e5024
commit 68c87c6f9c

View File

@@ -1290,7 +1290,7 @@ gtk_cups_connection_test_get_state (GtkCupsConnectionTest *test)
error_code = errno;
if (code == 0)
if (code == 0 || error_code == EISCONN)
{
close (test->socket);
test->socket = -1;