Miroslav Lichvar
2013-09-17 14:31:06 UTC
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 <***@redhat.com>
---
clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clock.c b/clock.c
index 4cde567..cf65fff 100644
--- a/clock.c
+++ b/clock.c
@@ -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;
descriptor is invalid and shouldn't be used for sending.
Signed-off-by: Miroslav Lichvar <***@redhat.com>
---
clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clock.c b/clock.c
index 4cde567..cf65fff 100644
--- a/clock.c
+++ b/clock.c
@@ -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;
--
1.8.3.1
1.8.3.1