From 0727ae7c72bf149bf5898c667933a27d44e94f7d Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 21 Jun 2009 23:02:22 +0200 Subject: Lkdn times out after few seconds idle so close it early and fix a crash on quit --- dev/syslog_relay.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/syslog_relay.c b/dev/syslog_relay.c index 3407f2f..e552e9c 100644 --- a/dev/syslog_relay.c +++ b/dev/syslog_relay.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -60,6 +61,7 @@ int main(int argc, char *argv[]) for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { iphone_set_debug_mask(DBGMASK_ALL); + iphone_set_debug(1); continue; } else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) { @@ -105,6 +107,8 @@ int main(int argc, char *argv[]) /* start syslog_relay service and retrieve port */ ret = iphone_lckd_start_service(control, "com.apple.syslog_relay", &port); if ((ret == IPHONE_E_SUCCESS) && port) { + iphone_lckd_free_client(control); + /* connect to socket relay messages */ int sfd = usbmuxd_connect(iphone_get_device_handle(phone), port); @@ -143,7 +147,6 @@ int main(int argc, char *argv[]) printf("ERROR: Could not start service com.apple.syslog_relay.\n"); } - iphone_lckd_free_client(control); iphone_free_device(phone); return 0; -- cgit v1.1-32-gdbae