Signed-off-by: Angus Salkeld <[email protected]>
---
lcr/uis.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lcr/uis.c b/lcr/uis.c
index 93745a5..a124134 100755
--- a/lcr/uis.c
+++ b/lcr/uis.c
@@ -174,12 +174,14 @@ static void *lcr_uis_server (void *data)
ufds[1].fd = accept (ufds[0].fd,
(struct sockaddr *)&un_addr, &addrlen);
#ifdef COROSYNC_LINUX
- setsockopt(ufds[1].fd, SOL_SOCKET, SO_PASSCRED,
- &on, sizeof (on));
+ if (ufds[1].fd >= 0) {
+ setsockopt(ufds[1].fd, SOL_SOCKET, SO_PASSCRED,
+ &on, sizeof (on));
+ }
#endif
nfds = 2;
}
- if (ufds[0].revents & POLLIN) {
+ if (ufds[1].fd >= 0 && (ufds[0].revents & POLLIN)) {
lcr_uis_dispatch (ufds[1].fd);
}
}
--
1.6.6.1
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais