On Mon, Nov 12, 2012 at 6:07 PM, Sebastian Dransfeld <[email protected]> 
wrote:
> Den 12. nov. 2012 kl. 16:46 skrev Lucas De Marchi 
> <[email protected]>:
>
>> 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
>>
>
> You send flags _in_, which still is named flags, but the _return_ value isn't 
> flags. Which you can see on the possible return values which are 1-4, not a 
> bit set.

oh... right. I misread the method.

thanks
Lucas De Marchi

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to