summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-03-12 12:26:57 +0100
committerGravatar Nikias Bassen2009-03-12 12:26:57 +0100
commite619bed09a001f074858fe084dc93d60924beca0 (patch)
tree12e933b16b8fd2095fe07691c44040d66da11fcb
parent5868567ca219c6dedd48462c44b21be78c3587e3 (diff)
downloadusbmuxd-e619bed09a001f074858fe084dc93d60924beca0.tar.gz
usbmuxd-e619bed09a001f074858fe084dc93d60924beca0.tar.bz2
initialization was missing and causing strange segmentation faults.
-rw-r--r--iphone.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/iphone.c b/iphone.c
index f4c747e..3dccf71 100644
--- a/iphone.c
+++ b/iphone.c
@@ -290,6 +290,11 @@ iphone_error_t iphone_get_specific_device(int bus_n, int dev_n, iphone_device_t
phone->__device = NULL;
phone->buffer = NULL;
+ // don't forget these:
+ phone->usbReceive.buffer = NULL;
+ phone->usbReceive.leftover = 0;
+ phone->usbReceive.capacity = 0;
+
// Initialize libusb
usb_init();
usb_find_busses();