Menu

#7 p2kmoto fixes

open
None
5
2007-10-23
2007-09-29
No

Hi,

Here are several fixes for the p2kmoto library.

Changelog

p2ktest.c:
Fixed bug with p2k_detectPhone symbol, used as function ptr instead of function for the test
Fixed bug with -l option
Added freespace and get commands (as well as quit)

p2kmoto.h, p2kmoto.c:
Added 'const' when possible, for a cleaner API
Restricted export of global variables by using 'static'
Removed global 'devInfo' - now used only locally in one function; this fixes also a crashing bug in p2k_getDevList()
Removed some unused local variables
Fixed p2k_setP2Kmode_DARWIN() to use p2k_getATvendor() instead of p2k_getATvendor, and p2k_getATproduct() instead of p2k_getATproduct.
Now uses difftime() to compare elapsed time; comparison is also done at the end of loops, not at the beginning
Fixed bug in p2k_connect(): phoneHandle could be left with invalid value after timeout
Resets phoneHandle in p2k_closePhone()
In p2k_inpSize(), uses smaller pause, with usleep(), instead of sleep(10); no need to wait so much!
Fixed memory leak in p2k_flashMode(), p2k_suspend(), p2k_FSAC_read()
Fixed command in p2k_getPhoneModel()
Added missing cmd param size in p2k_freeSpace()
Fixed bug in p2k_FSAC_searchRequest() with request max size
Fixed bug in p2k_FSAC_read() which was not passing the right cmd param size
Fixed bug in p2k_FSAC_read(): was raising when read size was smaller than asked size; there's now a problem with the last byte
p2k_FSAC_read() now returns the number of read bytes

Discussion

  • Stéphane Corthésy

    p2kmoto patches

     
  • Dmitry Nezhevenko

    Logged In: YES
    user_id=1225384
    Originator: NO

    Thanks for patch. It don't applies after last commits. I will review it later this week and apply changes by hands. However I don't agree with disabling reading of 1 byte long files. There should be some workaround.

     
  • Dmitry Nezhevenko

    • assigned_to: nobody --> dionua
     

Log in to post a comment.