summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Bastien Nocera2010-11-26 03:33:25 +0100
committerGravatar Nikias Bassen2010-11-26 03:33:25 +0100
commit02252a478689c5bb22552a3bce06b7bbe234cb6c (patch)
tree4c0d9342da83bd5d66a8dfc6dfa1a86648de6e68
parentb38a8ebaebc6a14a1ba17f36e9cb6e5b8e405c6a (diff)
downloadusbmuxd-02252a478689c5bb22552a3bce06b7bbe234cb6c.tar.gz
usbmuxd-02252a478689c5bb22552a3bce06b7bbe234cb6c.tar.bz2
libusbmuxd: Fix detection of already running usbmuxd (inotify)
-rw-r--r--libusbmuxd/libusbmuxd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c
index 5735a72..304e8da 100644
--- a/libusbmuxd/libusbmuxd.c
+++ b/libusbmuxd/libusbmuxd.c
@@ -405,7 +405,11 @@ static int usbmuxd_listen_inotify()
{
int inot_fd;
int watch_fd;
- int sfd;;
+ int sfd;
+
+ sfd = connect_usbmuxd_socket();
+ if (sfd >= 0)
+ return sfd;
sfd = -1;
inot_fd = inotify_init ();