public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] Problem when cancelling connect
@ 2008-01-18 10:37 jm
  2008-01-18 14:09 ` jm
  0 siblings, 1 reply; 2+ messages in thread
From: jm @ 2008-01-18 10:37 UTC (permalink / raw)
  To: bluez-users

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bluez-users] Problem when cancelling connect
  2008-01-18 10:37 [Bluez-users] Problem when cancelling connect jm
@ 2008-01-18 14:09 ` jm
  0 siblings, 0 replies; 2+ messages in thread
From: jm @ 2008-01-18 14:09 UTC (permalink / raw)
  To: BlueZ users

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-18 14:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-18 10:37 [Bluez-users] Problem when cancelling connect jm
2008-01-18 14:09 ` jm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox