On Sun, Nov 11, 2012 at 6:58 PM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> edbus: reply for name request is reply code
>
> Author:       englebass
> Date:         2012-11-11 12:58:38 -0800 (Sun, 11 Nov 2012)
> New Revision: 79121
> Trac:         http://trac.enlightenment.org/e/changeset/79121
>
> Modified:
>   trunk/edbus/src/examples/complex_types_server.c 
> trunk/edbus/src/examples/server.c
>
> Modified: trunk/edbus/src/examples/complex_types_server.c
> ===================================================================
> --- trunk/edbus/src/examples/complex_types_server.c     2012-11-11 20:27:55 
> UTC (rev 79120)
> +++ trunk/edbus/src/examples/complex_types_server.c     2012-11-11 20:58:38 
> UTC (rev 79121)
> @@ -313,7 +313,7 @@
>  static void
>  on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
>  {
> -   unsigned int flag;
> +   unsigned int reply;
>     EDBus_Service_Interface *iface = data;
>
>     resp2 = malloc(sizeof(char) * 5);
> @@ -325,13 +325,13 @@
>          return;
>       }
>
> -   if (!edbus_message_arguments_get(msg, "u", &flag))
> +   if (!edbus_message_arguments_get(msg, "u", &reply))
>       {
>          printf("error geting arguments on on_name_request\n");
>          return;
>       }
>
> -   if (!(flag & EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER))
> +   if (reply != EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER)

As a convention we give the var names the same name (or yodafied
versions) of what the d-bus
spec uses. In http://dbus.freedesktop.org/doc/dbus-specification.html
we have this:

UINT32 RequestName (in STRING name, in UINT32 flags)


So, using "flags" its indeed preferable IMO


Lucas De Marchi

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to