Skip to content

Commit

Permalink
idevice: Bump libusbmuxd dependency to 1.0.8 and adopt idevice.c to A…
Browse files Browse the repository at this point in the history
…PI changes
  • Loading branch information
FunkyM committed Apr 7, 2012
1 parent c153ee9 commit 0f5d47b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ AM_PROG_CC_C_O
AC_PROG_LIBTOOL

# Checks for libraries.
PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4)
PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 1.0.8)
PKG_CHECK_MODULES(libplist, libplist >= 1.8)
PKG_CHECK_MODULES(libplistmm, libplist++ >= 1.8)
AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build libimobiledevice])])
Expand Down
8 changes: 4 additions & 4 deletions src/idevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void usbmux_event_cb(const usbmuxd_event_t *event, void *user_data)
idevice_event_t ev;

ev.event = event->event;
ev.udid = event->device.uuid;
ev.udid = event->device.udid;
ev.conn_type = CONNECTION_USBMUXD;

if (event_cb) {
Expand Down Expand Up @@ -122,7 +122,7 @@ idevice_error_t idevice_get_device_list(char ***devices, int *count)

for (i = 0; dev_list[i].handle > 0; i++) {
newlist = realloc(*devices, sizeof(char*) * (newcount+1));
newlist[newcount++] = strdup(dev_list[i].uuid);
newlist[newcount++] = strdup(dev_list[i].udid);
*devices = newlist;
}
usbmuxd_device_list_free(&dev_list);
Expand Down Expand Up @@ -171,10 +171,10 @@ idevice_error_t idevice_device_list_free(char **devices)
idevice_error_t idevice_new(idevice_t * device, const char *udid)
{
usbmuxd_device_info_t muxdev;
int res = usbmuxd_get_device_by_uuid(udid, &muxdev);
int res = usbmuxd_get_device_by_udid(udid, &muxdev);
if (res > 0) {
idevice_t phone = (idevice_t) malloc(sizeof(struct idevice_private));
phone->udid = strdup(muxdev.uuid);
phone->udid = strdup(muxdev.udid);
phone->conn_type = CONNECTION_USBMUXD;
phone->conn_data = (void*)(long)muxdev.handle;
*device = phone;
Expand Down

0 comments on commit 0f5d47b

Please sign in to comment.