summaryrefslogtreecommitdiffstats
path: root/src/iphone.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-25 23:50:22 +0200
committerGravatar Jonathan Beck2008-08-31 19:33:18 +0200
commite52da6fe75008174a254254ec83394766afb624b (patch)
tree9ad8cd860525a3340dd49e2dbc8cd685dcf1ca7e /src/iphone.c
parent6ac4ceb4c6ee63c279f4841381a3eb09598f3517 (diff)
downloadlibimobiledevice-e52da6fe75008174a254254ec83394766afb624b.tar.gz
libimobiledevice-e52da6fe75008174a254254ec83394766afb624b.tar.bz2
make it compile
Diffstat (limited to 'src/iphone.c')
-rw-r--r--src/iphone.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/iphone.c b/src/iphone.c
index 9027e35..3d179de 100644
--- a/src/iphone.c
+++ b/src/iphone.c
@@ -76,7 +76,7 @@ int iphone_get_device ( iphone_device_t *device ){
76 76
77 // Check to see if we are connected 77 // Check to see if we are connected
78 if (!phone->device || !phone->__device) { 78 if (!phone->device || !phone->__device) {
79 free_iPhone(phone); 79 iphone_free_device(phone);
80 if (debug) fprintf(stderr, "get_iPhone(): iPhone not found\n"); 80 if (debug) fprintf(stderr, "get_iPhone(): iPhone not found\n");
81 return IPHONE_E_NO_DEVICE; 81 return IPHONE_E_NO_DEVICE;
82 } 82 }
@@ -99,7 +99,7 @@ int iphone_get_device ( iphone_device_t *device ){
99 // Check for bad response 99 // Check for bad response
100 if (bytes < 20) { 100 if (bytes < 20) {
101 free(version); 101 free(version);
102 free_iPhone(phone); 102 iphone_free_device(phone);
103 if (debug) fprintf(stderr, "get_iPhone(): Invalid version message -- header too short.\n"); 103 if (debug) fprintf(stderr, "get_iPhone(): Invalid version message -- header too short.\n");
104 if (debug && bytes < 0) fprintf(stderr, "get_iPhone(): libusb error message %d: %s (%s)\n", 104 if (debug && bytes < 0) fprintf(stderr, "get_iPhone(): libusb error message %d: %s (%s)\n",
105 bytes, usb_strerror(), strerror(-bytes)); 105 bytes, usb_strerror(), strerror(-bytes));
@@ -115,7 +115,7 @@ int iphone_get_device ( iphone_device_t *device ){
115 return IPHONE_E_SUCCESS; 115 return IPHONE_E_SUCCESS;
116 } else { 116 } else {
117 // Bad header 117 // Bad header
118 free_iPhone(phone); 118 iphone_free_device(phone);
119 free(version); 119 free(version);
120 if (debug) fprintf(stderr, "get_iPhone(): Received a bad header/invalid version number."); 120 if (debug) fprintf(stderr, "get_iPhone(): Received a bad header/invalid version number.");
121 return IPHONE_E_BAD_HEADER; 121 return IPHONE_E_BAD_HEADER;
@@ -123,7 +123,7 @@ int iphone_get_device ( iphone_device_t *device ){
123 123
124 // If it got to this point it's gotta be bad 124 // If it got to this point it's gotta be bad
125 if (debug) fprintf(stderr, "get_iPhone(): Unknown error.\n"); 125 if (debug) fprintf(stderr, "get_iPhone(): Unknown error.\n");
126 free_iPhone(phone); 126 iphone_free_device(phone);
127 free(version); 127 free(version);
128 return IPHONE_E_UNKNOWN_ERROR; // if it got to this point it's gotta be bad 128 return IPHONE_E_UNKNOWN_ERROR; // if it got to this point it's gotta be bad
129} 129}