Skip to content

Commit 5308dfe

Browse files
authored
Allocate ref on stack instead of the type itself for AFC service startup (#485)
1 parent 862f0c2 commit 5308dfe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ios-deploy/MobileDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ mach_error_t AMDeviceStartSession(struct am_device *device);
268268
*/
269269

270270
mach_error_t AMDeviceStartService(struct am_device *device, CFStringRef
271-
service_name, ServiceConnRef handle, unsigned int *
271+
service_name, ServiceConnRef * handle, unsigned int *
272272
unknown);
273273

274274
mach_error_t AMDeviceStartHouseArrestService(struct am_device *device, CFStringRef identifier, void *unknown, ServiceConnRef handle, unsigned int *what);
@@ -290,7 +290,7 @@ mach_error_t AMDeviceStopSession(struct am_device *device);
290290
* MDERR_AFC_OUT_OF_MEMORY if malloc() failed
291291
*/
292292

293-
afc_error_t AFCConnectionOpen(service_conn_t handle, unsigned int io_timeout,
293+
afc_error_t AFCConnectionOpen(ServiceConnRef handle, unsigned int io_timeout,
294294
AFCConnectionRef *conn);
295295

296296
/* Pass in a pointer to an afc_device_info structure. It will be filled. */

src/ios-deploy/ios-deploy.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ AFCConnectionRef start_afc_service(AMDeviceRef device) {
15201520
check_error(AMDeviceStartSession(device));
15211521

15221522
AFCConnectionRef conn = NULL;
1523-
service_conn_t serviceConn;
1523+
ServiceConnRef serviceConn = NULL;
15241524

15251525
if (AMDeviceStartService(device, AMSVC_AFC, &serviceConn, 0) != MDERR_OK) {
15261526
on_error(@"Unable to start file service!");

0 commit comments

Comments
 (0)