idevicesyslog: Make sure device event callback respects the presence or absence of --network option
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c
index 0eed138..5e9c386 100644
--- a/tools/idevicesyslog.c
+++ b/tools/idevicesyslog.c
@@ -484,6 +484,11 @@
 
 static void device_event_cb(const idevice_event_t* event, void* userdata)
 {
+	if (use_network && event->conn_type != CONNECTION_NETWORK) {
+		return;
+	} else if (!use_network && event->conn_type != CONNECTION_USBMUXD) {
+		return;
+	}
 	if (event->event == IDEVICE_DEVICE_ADD) {
 		if (!syslog) {
 			if (!udid) {