2006-05-24 06:49:16

by Gloria Saripah Patara

[permalink] [raw]
Subject: [Bluez-users] Found errors

Hello, Friends. I want ask you, about error messages.
Did you find this kind of message?
-------- Can't establish OBEX connection : Host is down -----------
I use perror to print the message. And function that raises the
message is BtOBEX_TransportConnect(...., ...., ....., ....)

inside this message i attached my code.

---------------------
Thanks in advance


Attachments:
(No filename) (363.00 B)
main.c (1.60 kB)
Download all attachments

2006-05-24 21:28:32

by Michael Mauch

[permalink] [raw]
Subject: [Bluez-users] Re: Found errors

Gloria Saripah Patara wrote:

> Hello, Friends. I want ask you, about error messages.
> Did you find this kind of message?
> -------- Can't establish OBEX connection : Host is down -----------
> I use perror to print the message. And function that raises the
> message is BtOBEX_TransportConnect(...., ...., ....., ....)
>
> inside this message i attached my code.

>From your code:

ii = (inquiry_info*)malloc(max_rsp * sizeof(inquiry_info));
free(ii);

return (ii->bdaddr);

That's wrong. After you freed ii, you are not allowed to access it
anymore. You may only access malloced variables between the malloc() and
the free(). After free(), the system may overwrite the contents of the
allocated memory.


Michael


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users