From: jm <jmtoro@omepet.es>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] Problem when cancelling connect
Date: Fri, 18 Jan 2008 15:09:38 +0100 [thread overview]
Message-ID: <4790B322.4040605@omepet.es> (raw)
In-Reply-To: <4790817D.3030400@omepet.es>
I forgot to mention I cancel the call to connect() using siglongjmp:
sigjmp_buf jmpbuf;
int sig_handler(int signo)
{
siglongjmp (jmpbuf, 1);
}
...
signal (SIGALRM, sig_handler);
alarm( MAX_CONNECT_TIME );
if (!sigsetjmp(jmpbuf, 1)){
BtOBEX_TransportConnect(handle, BDADDR_ANY, &bdaddr, channel)
alarm(0);
...
}
else{
signal (SIGALRM, SIG_DFL);
return -1;
}
> Hi all!
>
> I'm trying to cancel a call to connect() (The one called by
> BtOBEX_TransportConnect) using a SIGALRM signal. It works fine, but a
> random subsequent call to hci_inquiry() or sdp_connect() causes a
> segmentation fault. I've tried to restore the default signal handler and
> closing the socket by hand, with no luck. Any idea about what is going on?
>
> Thanks in advance
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
prev parent reply other threads:[~2008-01-18 14:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 10:37 [Bluez-users] Problem when cancelling connect jm
2008-01-18 14:09 ` jm [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4790B322.4040605@omepet.es \
--to=jmtoro@omepet.es \
--cc=bluez-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.