Return-Path: MIME-Version: 1.0 In-Reply-To: <20110317123031.GA12238@jh-x301> References: <1300274712-3931-1-git-send-email-bruna.moreira@openbossa.org> <1300274712-3931-2-git-send-email-bruna.moreira@openbossa.org> <20110317123031.GA12238@jh-x301> Date: Thu, 17 Mar 2011 08:43:14 -0400 Message-ID: Subject: Re: [PATCH 2/5] Add internal buffer to GAttrib struct From: Bruna Moreira To: Bruna Moreira , linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: On 3/17/11, Johan Hedberg wrote: > Hi Bruna, > > On Wed, Mar 16, 2011, Bruna Moreira wrote: >> +gboolean g_attrib_set_buffer(GAttrib *attrib, int mtu) >> +{ >> + if (mtu < ATT_DEFAULT_LE_MTU) >> + mtu = ATT_DEFAULT_LE_MTU; >> + >> + if (mtu > ATT_MAX_MTU) >> + mtu = ATT_MAX_MTU; >> + >> + if (!bt_io_set(attrib->io, BT_IO_L2CAP, NULL, >> + BT_IO_OPT_OMTU, mtu, >> + BT_IO_OPT_INVALID)) >> + return FALSE; >> + >> + attrib->buf = g_realloc(attrib->buf, mtu); >> + >> + attrib->buflen = mtu; >> + >> + return TRUE; >> +} > > Wouldn't g_attrib_set_mtu make more sense for the name of this function? > Since it's named symmetrically to the _get version one would expect it > to take a buffer as an input parameter, but it's not doing that. Agreed. I will send a new updated series. BR, -- Bruna Moreira Instituto Nokia de Tecnologia (INdT) Manaus - Brazil