Click here to Skip to main content
14,662,171 members
Home » Discussions » Linux Programming
   

Linux Programming

 
GeneralRe: Return indicates failure , errno indicates status? Pin
Vaclav_6-Mar-20 8:18
MemberVaclav_6-Mar-20 8:18 
GeneralRe: Return indicates failure , errno indicates status? Pin
Richard MacCutchan6-Mar-20 21:42
mveRichard MacCutchan6-Mar-20 21:42 
GeneralRe: Return indicates failure , errno indicates status? Pin
k50547-Mar-20 4:55
mvek50547-Mar-20 4:55 
GeneralRe: Return indicates failure , errno indicates status? Pin
Vaclav_7-Mar-20 6:01
MemberVaclav_7-Mar-20 6:01 
GeneralRe: Return indicates failure , errno indicates status? Pin
Richard MacCutchan8-Mar-20 1:29
mveRichard MacCutchan8-Mar-20 1:29 
QuestionUsing ba2str fails - why ? Pin
Vaclav_4-Mar-20 4:59
MemberVaclav_4-Mar-20 4:59 
AnswerRe: Using ba2str fails - why ? Pin
ZurdoDev4-Mar-20 5:14
mveZurdoDev4-Mar-20 5:14 
GeneralRe: Using ba2str fails - why ? Pin
Vaclav_4-Mar-20 5:36
MemberVaclav_4-Mar-20 5:36 
len = 8;
max_rsp = 255;
flags = IREQ_CACHE_FLUSH;
ii = (inquiry_info*) malloc(max_rsp * sizeof(inquiry_info));
cout << "TASK run hci_inquiry same as hcitoo scan  - takes time  @line "
        << dec << __LINE__ << endl;
num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags);
perror("STATUS hci_inquiry");
errno = 0;                 // reset !

if (num_rsp < 0)
    perror("FAILED (?) hci_inquiry");

for (i = 0; i < num_rsp; i++) {
    ba2str(&(ii + i)->bdaddr, addr);
    memset(name, 0, sizeof(name));
    if (hci_read_remote_name(dev_descriptor, &(ii + i)->bdaddr,
            sizeof(name), name, 0) < 0)
        strcpy(name, "[unknown]");
    printf("remote address  %s  remote name  %s\n", addr, name);
}


the question is
WHY does highlighted code throws an error
AnswerRe: Using ba2str fails - why ? Pin
ZurdoDev4-Mar-20 5:48
mveZurdoDev4-Mar-20 5:48 
GeneralRe: Using ba2str fails - why ? Pin
k50544-Mar-20 5:54
mvek50544-Mar-20 5:54 
AnswerRe: Using ba2str fails - why ? Pin
k50544-Mar-20 5:20
mvek50544-Mar-20 5:20 
AnswerRe: Using ba2str fails - why ? Pin
Richard MacCutchan4-Mar-20 5:34
mveRichard MacCutchan4-Mar-20 5:34 
GeneralRe: Using ba2str fails - why ? Pin
Vaclav_4-Mar-20 5:46
MemberVaclav_4-Mar-20 5:46 
GeneralRe: Using ba2str fails - why ? Pin
Richard MacCutchan4-Mar-20 6:16
mveRichard MacCutchan4-Mar-20 6:16 
AnswerSOLVED Re: Using ba2str fails - why ? Pin
Vaclav_4-Mar-20 6:33
MemberVaclav_4-Mar-20 6:33 
QuestionCan "cast looses precision " error be optioned out ? Pin
Vaclav_3-Mar-20 4:10
MemberVaclav_3-Mar-20 4:10 
AnswerRe: Can "cast looses precision " error be optioned out ? Pin
Richard MacCutchan3-Mar-20 4:43
mveRichard MacCutchan3-Mar-20 4:43 
AnswerRe: Can "cast looses precision " error be optioned out ? Pin
Daniel Pfeffer3-Mar-20 4:52
professionalDaniel Pfeffer3-Mar-20 4:52 
AnswerRe: Can "cast looses precision " error be optioned out ? Pin
k50543-Mar-20 5:52
mvek50543-Mar-20 5:52 
AnswerSOLVED Re: Can "cast looses precision " error be optioned out ? Pin
Vaclav_3-Mar-20 8:00
MemberVaclav_3-Mar-20 8:00 
GeneralRe: SOLVED Re: Can "cast looses precision " error be optioned out ? Pin
k50543-Mar-20 10:36
mvek50543-Mar-20 10:36 
GeneralRe: SOLVED Re: Can "cast looses precision " error be optioned out ? Pin
Vaclav_3-Mar-20 13:47
MemberVaclav_3-Mar-20 13:47 
QuestionBluetooth socket failures Pin
Vaclav_28-Feb-20 5:43
MemberVaclav_28-Feb-20 5:43 
AnswerRe: Bluetooth socket failures Pin
Richard MacCutchan28-Feb-20 6:32
mveRichard MacCutchan28-Feb-20 6:32 
GeneralRe: Bluetooth socket failures Pin
Vaclav_28-Feb-20 7:12
MemberVaclav_28-Feb-20 7:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.