* [Bluez-devel] [PATCH] make 64-bit headsetd work with 32-bit clients
@ 2007-01-21 18:23 Måns Rullgård
2007-01-22 12:44 ` Fabien Chevalier
0 siblings, 1 reply; 2+ messages in thread
From: Måns Rullgård @ 2007-01-21 18:23 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
The attached patch makes headsetd and the ALSA PCM plugin use
fixed-width types in the IPC data structures. Without this, a 32-bit
client will not work with a 64-bit headsetd and vice versa because of
the different sizes of the 'long' type.
--
Måns Rullgård
mru@inprovide.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: headset-32-64bit.patch --]
[-- Type: text/x-patch, Size: 1840 bytes --]
Index: alsa-plugins/pcm_sco.c
===================================================================
RCS file: /cvsroot/bluetooth-alsa/plugz/alsa-plugins/pcm_sco.c,v
retrieving revision 1.2
diff -u -r1.2 pcm_sco.c
--- alsa-plugins/pcm_sco.c 28 Dec 2006 12:52:37 -0000 1.2
+++ alsa-plugins/pcm_sco.c 21 Jan 2007 16:05:30 -0000
@@ -24,6 +24,7 @@
#include <sys/un.h>
#include <unistd.h>
#include <errno.h>
+#include <stdint.h>
#include <alsa/asoundlib.h>
#include <alsa/pcm_external.h>
@@ -85,8 +86,8 @@
unsigned char type;
union {
bdaddr_t bdaddr; /* PKT_TYPE_CFG_BDADDR */
- long timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
- int errorcode; /* PKT_TYPE_ERROR_IND */
+ int32_t timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
+ int32_t errorcode; /* PKT_TYPE_ERROR_IND */
};
} ipc_packet_t;
Index: alsa-plugins/headsetd/states.c
===================================================================
RCS file: /cvsroot/bluetooth-alsa/plugz/alsa-plugins/headsetd/states.c,v
retrieving revision 1.2
diff -u -r1.2 states.c
--- alsa-plugins/headsetd/states.c 28 Dec 2006 12:52:38 -0000 1.2
+++ alsa-plugins/headsetd/states.c 21 Jan 2007 16:05:30 -0000
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <errno.h>
#include <syslog.h>
+#include <stdint.h>
#include <config.h>
#include "states.h"
@@ -59,8 +60,8 @@
unsigned char type;
union {
bdaddr_t bdaddr; /* PKT_TYPE_CFG_BDADDR */
- long timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
- int errorcode; /* PKT_TYPE_ERROR_IND */
+ int32_t timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
+ int32_t errorcode; /* PKT_TYPE_ERROR_IND */
};
} ipc_packet_t;
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- 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] 2+ messages in thread
* Re: [Bluez-devel] [PATCH] make 64-bit headsetd work with 32-bit clients
2007-01-21 18:23 [Bluez-devel] [PATCH] make 64-bit headsetd work with 32-bit clients Måns Rullgård
@ 2007-01-22 12:44 ` Fabien Chevalier
0 siblings, 0 replies; 2+ messages in thread
From: Fabien Chevalier @ 2007-01-22 12:44 UTC (permalink / raw)
To: BlueZ development
Thanks you for this, i applied it to CVS.
Cheers,
Fabien
> The attached patch makes headsetd and the ALSA PCM plugin use
> fixed-width types in the IPC data structures. Without this, a 32-bit
> client will not work with a 64-bit headsetd and vice versa because of
> the different sizes of the 'long' type.
>
>
>
> ------------------------------------------------------------------------
>
> Index: alsa-plugins/pcm_sco.c
> ===================================================================
> RCS file: /cvsroot/bluetooth-alsa/plugz/alsa-plugins/pcm_sco.c,v
> retrieving revision 1.2
> diff -u -r1.2 pcm_sco.c
> --- alsa-plugins/pcm_sco.c 28 Dec 2006 12:52:37 -0000 1.2
> +++ alsa-plugins/pcm_sco.c 21 Jan 2007 16:05:30 -0000
> @@ -24,6 +24,7 @@
> #include <sys/un.h>
> #include <unistd.h>
> #include <errno.h>
> +#include <stdint.h>
>
> #include <alsa/asoundlib.h>
> #include <alsa/pcm_external.h>
> @@ -85,8 +86,8 @@
> unsigned char type;
> union {
> bdaddr_t bdaddr; /* PKT_TYPE_CFG_BDADDR */
> - long timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
> - int errorcode; /* PKT_TYPE_ERROR_IND */
> + int32_t timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
> + int32_t errorcode; /* PKT_TYPE_ERROR_IND */
> };
> } ipc_packet_t;
>
> Index: alsa-plugins/headsetd/states.c
> ===================================================================
> RCS file: /cvsroot/bluetooth-alsa/plugz/alsa-plugins/headsetd/states.c,v
> retrieving revision 1.2
> diff -u -r1.2 states.c
> --- alsa-plugins/headsetd/states.c 28 Dec 2006 12:52:38 -0000 1.2
> +++ alsa-plugins/headsetd/states.c 21 Jan 2007 16:05:30 -0000
> @@ -34,6 +34,7 @@
> #include <stdlib.h>
> #include <errno.h>
> #include <syslog.h>
> +#include <stdint.h>
>
> #include <config.h>
> #include "states.h"
> @@ -59,8 +60,8 @@
> unsigned char type;
> union {
> bdaddr_t bdaddr; /* PKT_TYPE_CFG_BDADDR */
> - long timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
> - int errorcode; /* PKT_TYPE_ERROR_IND */
> + int32_t timeout; /* PKT_TYPE_CFG_PAGINGTIMEOUT */
> + int32_t errorcode; /* PKT_TYPE_ERROR_IND */
> };
> } ipc_packet_t;
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-22 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-21 18:23 [Bluez-devel] [PATCH] make 64-bit headsetd work with 32-bit clients Måns Rullgård
2007-01-22 12:44 ` Fabien Chevalier
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.