public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c
@ 2007-05-12 18:27 Petteri Räty
  2007-05-13  5:08 ` [Bluez-devel] RE : " Frederic Dalleau
  2007-05-13 17:55 ` [Bluez-devel] " Petteri Räty
  0 siblings, 2 replies; 5+ messages in thread
From: Petteri Räty @ 2007-05-12 18:27 UTC (permalink / raw)
  To: bluez-devel


[-- Attachment #1.1: Type: text/plain, Size: 2278 bytes --]

betelgeuse@pena ~ $ a2dpd -n -v -o -g -b
A2DPD[21:17:29.577]: init_ipc: Selected IPC: inet, addr=127.0.0.1,
bcst=127.0.0.255, port=8000
A2DPD[21:17:29.577]: make_daemon_process: a2dpd [May 12 2007 19:46:25]
starting ...
A2DPD[21:17:29.577]: main: (errno=13:Permission denied)a2dpd
addr=00:13:17:70:3E:A0 timer=0 us [May 12 2007 19:46:26]
A2DPD[21:17:29.577]: a2dpd_signal_init: Getting on DBUS
A2DPD[21:17:29.579]: a2dpd_signal_init: Installing watch
A2DPD[21:17:29.579]: add_dbus_watch: Added watch 0 0x80a3770 disabled
A2DPD[21:17:29.579]: add_dbus_watch: Added watch 1 0x80a3798 enabled
A2DPD[21:17:29.579]: a2dpd_signal_init: Registering object path:
/com/access/a2dpd
A2DPD[21:17:29.579]: a2dpd_signal_init: Acquiring service: com.access.a2dpd
A2DPD[21:17:29.580]: a2dpd_signal_init: OK
A2DPD[21:17:29.580]: a2dpd_signal_init: OK
A2DPD[21:17:29.580]: a2dpd_register_sdp: Start
A2DPD[21:17:29.580]: add_avrtg:
A2DPD[21:17:29.580]: add_a2source:
A2DPD[21:17:29.580]: a2dpd_register_sdp: OK
A2DPD[21:17:29.580]: main_loop:
A2DPD[21:17:29.581]: make_server_socket:
A2DPD[21:17:29.581]: a2dp_make_listen_socket: (errno=13:Permission
denied)Cannot bind socket 6 for psm 25
A2DPD[21:17:29.581]: main_loop: Cannot get AVDTP socket
A2DPD[21:17:30.581]: main_loop:
A2DPD[21:17:30.581]: make_server_socket:
A2DPD[21:17:30.581]: main_loop: (errno=98:Address already in use)Cannot
get UNIX socket
A2DPD[21:17:31.581]: main_loop:
A2DPD[21:17:31.581]: make_server_socket:
A2DPD[21:17:31.581]: main_loop: (errno=98:Address already in use)Cannot
get UNIX socket
A2DPD[21:17:32.581]: main_loop:
A2DPD[21:17:32.581]: make_server_socket:
A2DPD[21:17:32.581]: main_loop: (errno=98:Address already in use)Cannot
get UNIX socket
A2DPD[21:17:33.514]: sigint_handler: handling SIGINT
A2DPD[21:17:33.514]: main_loop: (errno=4:Interrupted system call)
A2DPD[21:17:33.514]: make_server_socket:
A2DPD[21:17:33.514]: main_loop: (errno=98:Address already in use)Cannot
get UNIX socket
A2DPD[21:17:33.968]: sigint_handler: handling SIGINT

Basically it seems to go into an endless loop when it can't get the
socket and I must then kill it with kill -9 <pid>.

I tried to change various things in .a2pdrc but didn't make a difference.

Regards,
Petteri


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* [Bluez-devel] RE : a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c
  2007-05-12 18:27 [Bluez-devel] a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c Petteri Räty
@ 2007-05-13  5:08 ` Frederic Dalleau
  2007-05-13 17:55 ` [Bluez-devel] " Petteri Räty
  1 sibling, 0 replies; 5+ messages in thread
From: Frederic Dalleau @ 2007-05-13  5:08 UTC (permalink / raw)
  To: BlueZ development

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

> Basically it seems to go into an endless loop when it can't get the
> socket and I must then kill it with kill -9 <pid>.

Try to run it as root to get the sockets.
 You'll need to run your player as root too.
 It can't figure why these sockets are failing until I get a computer doing it.

Regards,
Frederic



[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 3024 bytes --]

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c
  2007-05-12 18:27 [Bluez-devel] a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c Petteri Räty
  2007-05-13  5:08 ` [Bluez-devel] RE : " Frederic Dalleau
@ 2007-05-13 17:55 ` Petteri Räty
  2007-05-13 18:20   ` Petteri Räty
  1 sibling, 1 reply; 5+ messages in thread
From: Petteri Räty @ 2007-05-13 17:55 UTC (permalink / raw)
  To: BlueZ development


[-- Attachment #1.1.1: Type: text/plain, Size: 220 bytes --]

Petteri Räty kirjoitti:
> 
> Basically it seems to go into an endless loop when it can't get the
> socket and I must then kill it with kill -9 <pid>.
> 

Attached is a patch that fixes this.

Regards,
Petteri

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: a2dpd-sigint.patch --]
[-- Type: text/x-patch; name="a2dpd-sigint.patch", Size: 454 bytes --]

Index: a2dpd.c
===================================================================
RCS file: /cvsroot/bluetooth-alsa/plugz/alsa-plugins/a2dpd/a2dpd.c,v
retrieving revision 1.31
diff -u -r1.31 a2dpd.c
--- a2dpd.c	10 May 2007 10:06:11 -0000	1.31
+++ a2dpd.c	13 May 2007 17:54:09 -0000
@@ -1780,7 +1780,7 @@
 	a2dp_init();
 
 	// Run main loop
-	while(main_loop(addr)<0) {
+	while(main_loop(addr)<0 && !bSigINTReceived) {
 		sleep(1);
 	}
 

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c
  2007-05-13 17:55 ` [Bluez-devel] " Petteri Räty
@ 2007-05-13 18:20   ` Petteri Räty
  2007-05-13 18:56     ` [Bluez-devel] RE : " Frederic Dalleau
  0 siblings, 1 reply; 5+ messages in thread
From: Petteri Räty @ 2007-05-13 18:20 UTC (permalink / raw)
  To: BlueZ development


[-- Attachment #1.1: Type: text/plain, Size: 663 bytes --]

Petteri Räty kirjoitti:
> Petteri Räty kirjoitti:
>> Basically it seems to go into an endless loop when it can't get the
>> socket and I must then kill it with kill -9 <pid>.
>>
> 
> Attached is a patch that fixes this.
> 
> Regards,
> Petteri
> 
> 

Can someone explain why this code is in the main loop in the first
place. I would think that the sockets need to be created only once.

	// Master socket
	sockfd = make_server_socket();
	if(sockfd<0) {
		DBG("Cannot get UNIX socket");
		return -1;
	}

	avdtpfd = a2dp_make_listen_socket(25);
	if(avdtpfd<0) {
		DBG("Cannot get AVDTP socket");
		return -1;
	}

Regards,
Petteri


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* [Bluez-devel] RE : a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c
  2007-05-13 18:20   ` Petteri Räty
@ 2007-05-13 18:56     ` Frederic Dalleau
  0 siblings, 0 replies; 5+ messages in thread
From: Frederic Dalleau @ 2007-05-13 18:56 UTC (permalink / raw)
  To: BlueZ development

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

> Can someone explain why this code is in the main loop in the first
> place. I would think that the sockets need to be created only once.

This is mainly historical, as the main_loop wasn't called in loop first.
If the socket fails to create, a2dpd will retry until it is ok. This is useful when coding, if you forgot another process running.

Frederic




[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 3112 bytes --]

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2007-05-13 18:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-12 18:27 [Bluez-devel] a2dpd getting into an endless loop when it fails to get a socket and not dying on CTRL+c Petteri Räty
2007-05-13  5:08 ` [Bluez-devel] RE : " Frederic Dalleau
2007-05-13 17:55 ` [Bluez-devel] " Petteri Räty
2007-05-13 18:20   ` Petteri Räty
2007-05-13 18:56     ` [Bluez-devel] RE : " Frederic Dalleau

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