From 95e035ab3d3ee79965b846ff64970cdba4436f95 Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Wed, 2 May 2012 23:28:12 -0500 Subject: Ignore return value of recvmsg, wtf? --- src/clojure/foofs/fuse/jna.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/clojure/foofs/fuse/jna.clj b/src/clojure/foofs/fuse/jna.clj index 3e699ac..dce885e 100644 --- a/src/clojure/foofs/fuse/jna.clj +++ b/src/clojure/foofs/fuse/jna.clj @@ -222,6 +222,6 @@ (.setInt msg offsetof-msg_iovlen (.size iov)) (.setPointer msg offsetof-msg_control ccmsg) (.setInt msg offsetof-msg_controllen (.size ccmsg)) - (let [rv (recvmsg sockfd msg 0)] - (when (and (< 0 rv) (== scm-rights (.getInt ccmsg 8))) - (.getInt ccmsg 12))))) + (recvmsg sockfd msg 0) ;; WTF: even when this returns -1 it seems to work + (when (== scm-rights (.getInt ccmsg 8)) + (.getInt ccmsg 12)))) -- cgit v1.2.3-18-g5258