2008-01-07 23:09:10

by Pavel Semerad

[permalink] [raw]
Subject: [Bluez-devel] patch removing one extra memset


Helo,

I have found one mistake in audio/ctl_bluetooth.c . When initializing
this plugin, 'data' is allocated and memset-ed to 0. Then socket is
created and assigned to 'data'. And then there is another memset, which
sets this socket back to zero.
Patch removing this extra memset is attached:

--- ./audio/ctl_bluetooth.c.ps 2007-12-08 20:04:39.000000000 +0100
+++ ./audio/ctl_bluetooth.c 2008-01-07 23:41:23.000000000 +0100
@ -327,8 +327,6 @@ SND_CTL_PLUGIN_DEFINE_FUNC(bluetooth)
if (err < 0)
goto error;

- memset(data, 0, sizeof(*data));
-
data->ext.version = SND_CTL_EXT_VERSION;
data->ext.card_idx = -1;


Pavel Semerad


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2008-01-09 03:06:07

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] HFP method "SetupCall" + audio-api.txt update

Hi Marcel,

On Jan 8, 2008, at 20:28, Marcel Holtmann wrote:
>> Here is a patch for adding the SetupCall method , used for call
>> setup on
>> hfp. Also adding a patch to update the audio-api.txt file for the
>> same.
>>
>> Let me know if anything needs to be changed.
>
> the signal should be "CallTerminated" or its description is wrong. A
> name like "TerminateCall" would be a name for a method.

The CVS now has the correct name for the signal ("CallTerminated").

Johan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-01-08 18:28:57

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] [PATCH] HFP method "SetupCall" + audio-api.txt update

Hi Alok,

> Here is a patch for adding the SetupCall method , used for call setup on
> hfp. Also adding a patch to update the audio-api.txt file for the same.
>
> Let me know if anything needs to be changed.

the signal should be "CallTerminated" or its description is wrong. A
name like "TerminateCall" would be a name for a method.

Regards

Marcel



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-01-07 23:47:49

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] patch removing one extra memset

Pavel

> I have found one mistake in audio/ctl_bluetooth.c . When initializing
> this plugin, 'data' is allocated and memset-ed to 0. Then socket is
> created and assigned to 'data'. And then there is another memset

ok, fixed. I also saw the first memset happened before the test to see
if the malloc worked.

--
Brad

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel