bug in linux DynamicBtBind function

2010-07-29
2013-05-28
  • leniviytorrent
    leniviytorrent
    2010-07-29

    Smartcam conflicts with other bluetooth programs, because it always listens on port 1.

    CommHandler.cpp:
    int CCommHandler::DynamicBtBind(int sock, struct sockaddr_rc* sockaddr, uint8_t* port)
    {


            sockaddr->rc_channel = htons(*port);


    htons(1) == 256, htons(2) == 257 etc.
    sizeof(sockaddr->rc_channel) is "1" on my x86 linux. This assignment truncates hibyte.

    Because of that rc_channel is always 0.