#5 fix to have bluetooth and irda working with the same binary

closed-accepted
nobody
None
5
2005-01-10
2004-12-21
No

Hi,

see the bug report at:
https://sourceforge.net/tracker/index.php?func=detail&aid=1089341&group_id=8960&atid=108960

The patch that fixes it is attached.

HS

Discussion

  • Hendrik Sattler

    Hendrik Sattler - 2004-12-21

    Logged In: YES
    user_id=356160

    damn sf.net web interface, resending patch

     
  • Hendrik Sattler

    Hendrik Sattler - 2004-12-21

    irda and bt patch

     
  • Hendrik Sattler

    Hendrik Sattler - 2004-12-21

    Logged In: YES
    user_id=356160

    changed patch to make it REALLY simple

     
  • Hendrik Sattler

    Hendrik Sattler - 2004-12-21

    irda and bt patch (2nd version)

     
  • Christian W. Zuckschwerdt

    Logged In: YES
    user_id=136432

    Thank you.

     
  • Christian W. Zuckschwerdt

    • status: open --> closed-accepted
     
  • Alex Kanavin

    Alex Kanavin - 2005-02-24

    Logged In: YES
    user_id=1213737

    This patch does not fix everything, I'm afraid. How about
    this code a little below?

    int obexftp_cli_connect_uuid(obexftp_client_t *cli, const
    char *device, int port
    , const uint8_t uuid[])
    //.... skipped some lines
    #ifdef HAVE_BLUETOOTH
    //... skipped some more
    ret = BtOBEX_TransportConnect(cli->obexhandle,
    //... and more
    #endif
    if (ret == -1 /* -ESOCKTNOSUPPORT */)
    ret =
    IrOBEX_TransportConnect(cli->obexhandle, "OBEX");
    DEBUG(3, "%s() IR %d\n", __func__, ret);

    I have a patch which fixes all this very sloppy coding, so
    I'll polish and submit it.

    By the way, why obexftp is not in CVS?

     
  • Hendrik Sattler

    Hendrik Sattler - 2005-02-24

    Logged In: YES
    user_id=356160

    The function obexftp_cli_connect_uuid() is only
    called at one point in obexftp.c when the -x option is
    used (and that function never did anything useful with
    my S55).
    The current way it seems to work is to not try
    Bluetooth (the if (device) should go), then irda, then
    cable. Besides that the order should be inverted (BT
    will most likely catch the wrong device), there is
    nothing wrong.
    Additionally, it does not influence the previous patch
    in any way.

     
  • Alex Kanavin

    Alex Kanavin - 2005-02-24

    Logged In: YES
    user_id=1213737

    No, it's not one point, it's actually always called when you
    make a connection:

    #define obexftp_cli_connect(cli, device, port) \ obexftp_cli_connect_uuid(cli, device, port, UUID_FBS)

    Anyway, the call to obexftp_cli_open clearly specifies what
    transport should be used, so obexftp_cli_open should store
    it somewhere (say, in struct obexftp_client), so that
    obexftp_cli_connect wouldn't have to do any guessing. That's
    what my patch does.

     

Log in to post a comment.