Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

[PATCH] Fix receive of plists larger than a packet

#35

Both the "lockdown recv" and "mobilesync recv" functions only request a single usbmux packet using "iphone_mux_recv()" and ignore that the datalen reported might be larger than the amount of bytes received.

This causes havok for larger plists (or actually any data) which the device spreads and sends to us among multiple usbmux packets.

The patch below fixes this for the mobile sync part. It allows to correctly receive mobile sync plists now, even if they contain a lot of data (like JPEG image data from contacts). libplist seems to have no trouble parsing the response afterwards, too.

The question is though, if this should be addressed in each "client" using "iphone_mux_recv()" or if it would be feasable to somehow adjust the mux_recv itself to know that there is still data left to be read.

I have not checked whether libiphone should/does also spread data among packets or if sending large plists can work.

Reported by Martin S. · April 18th, 2009 @ 05:55 PM

State: resolved
Milestone: none
Assigned to: Matt Colyer Matt Colyer

Activity

  1. Martin S.
    Martin S.

    Here is a patch for lockdown, however I am not sure if the SSL stuff will work with the buffer receive loop as good as iphone_mux_recv, thus I would not accept it without verification by someone.

    April 18th, 2009 @ 05:56 PM

  2. Martin S.
    Martin S.

    Patch below is now fixed and replaces both earlier patches.

    As explained this makes receive of bigger plists work for MobileSync which is required if one has a lot of contacts to sync.

    April 22nd, 2009 @ 06:34 PM

  3. Matt Colyer
    Matt Colyer
    • State changed from new to resolved

    (from [fa8424a5da3d9e745541834048a5bbbfd5427a5c]) Fix receive of plists larger than a packet for lockdown and MobileSync

    [#35 [PATCH] Fix receive of plists larger than a packet state:resolved]

    Signed-off-by: Matt Colyer matt@colyer.name http://github.com/MattColyer/lib...

    April 24th, 2009 @ 02:05 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.