Don't try to forward messages to faulty UDS port.

When the socket couldn't be opened (e.g. in clknetsim), the file
descriptor is invalid and shouldn't be used for sending.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2013-09-17 16:31:06 +02:00 committed by Richard Cochran
parent b366b79306
commit 45493756f8
1 changed files with 1 additions and 1 deletions

View File

@ -553,7 +553,7 @@ static int forwarding(struct clock *c, struct port *p)
default:
break;
}
if (p == c->port[c->nports]) { /*uds*/
if (p == c->port[c->nports] && ps != PS_FAULTY) { /*uds*/
return 1;
}
return 0;