Return-Path: From: To: CC: , , Date: Fri, 5 Nov 2010 17:14:43 +0200 Subject: RE: [PATCH 4/4] Sim Access Profile dummy driver Message-ID: <99B09243E1A5DA4898CDD8B700111448098BAE50FB@EXMB04.eu.tieto.com> References: <1288791271-13857-1-git-send-email-waldemar.rymarkiewicz@tieto.com> <1288791271-13857-5-git-send-email-waldemar.rymarkiewicz@tieto.com> <20101105101600.GC32149@jh-x301> In-Reply-To: <20101105101600.GC32149@jh-x301> Content-Type: multipart/mixed; boundary="_002_99B09243E1A5DA4898CDD8B700111448098BAE50FBEXMB04eutieto_" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: --_002_99B09243E1A5DA4898CDD8B700111448098BAE50FBEXMB04eutieto_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Johan,=20 > >Never mind the previous comment I had about this. I checked=20 >the rest of the tree and it seems this inline convention for=20 >D-Bus error generating functions is quite common (though imho=20 >might not be needed at all). > >> + if(sim_card_connection_status !=3D SIM_CONNECTED) > >Space before ( > >> +} >> + >> + >> +static GDBusMethodTable dummy_methods[] =3D { > >Remove the other empty line. > >> + { "OngoingCall", "b", "", ongoing_call}, >> + { "MaxMessageSize", "u", "", max_msg_size}, >> + { "Disconnect", "", "", disconnect}, >> + { "CardStatus", "u", "", card_status}, >> + { } > >> +static GDBusSignalTable dummy_signals[] =3D { >> + { "","" }, >> + { } >> +}; > >If you have no signals just pass NULL to=20 >g_dbus_register_interface instead of declaring an (almost)=20 >empty table. Also, "" isn't a valid value for the signal name. Thanks again for comments and see attached patch. /Waldek= --_002_99B09243E1A5DA4898CDD8B700111448098BAE50FBEXMB04eutieto_ Content-Type: application/octet-stream; name="0004-Sim-Access-Profile-dummy-driver.patch" Content-Description: 0004-Sim-Access-Profile-dummy-driver.patch Content-Disposition: attachment; filename="0004-Sim-Access-Profile-dummy-driver.patch"; size=12326; creation-date="Fri, 05 Nov 2010 16:24:44 GMT"; modification-date="Fri, 05 N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