Module: xenomai-forge
Branch: master
Commit: 7160984d6737d0b0cee47f15690971f3979490e9
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7160984d6737d0b0cee47f15690971f3979490e9

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Nov 13 17:11:19 2011 +0100

copperplate/cluster: fix timeout handling on synchronized lookups

---

 lib/copperplate/cluster.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/copperplate/cluster.c b/lib/copperplate/cluster.c
index 31cde5e..0c38d1b 100644
--- a/lib/copperplate/cluster.c
+++ b/lib/copperplate/cluster.c
@@ -284,7 +284,8 @@ int syncluster_findobj(struct syncluster *sc,
                        *cobjp = cobj;
                        break;
                }
-               if (timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
+               if (timeout &&
+                   timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
                        ret = -EWOULDBLOCK;
                        break;
                }
@@ -432,7 +433,8 @@ int pvsyncluster_findobj(struct pvsyncluster *sc,
                        *cobjp = cobj;
                        break;
                }
-               if (timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
+               if (timeout &&
+                   timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
                        ret = -EWOULDBLOCK;
                        break;
                }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to