forked from enlightenment/efl
edbus: reply for name request is reply code
SVN revision: 79121
This commit is contained in:
parent
121c87e091
commit
f8d97711a7
|
@ -313,7 +313,7 @@ static Eina_Bool _emit_changed(void *data)
|
||||||
static void
|
static void
|
||||||
on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
|
on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
|
||||||
{
|
{
|
||||||
unsigned int flag;
|
unsigned int reply;
|
||||||
EDBus_Service_Interface *iface = data;
|
EDBus_Service_Interface *iface = data;
|
||||||
|
|
||||||
resp2 = malloc(sizeof(char) * 5);
|
resp2 = malloc(sizeof(char) * 5);
|
||||||
|
@ -325,13 +325,13 @@ on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
|
||||||
return;
|
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");
|
printf("error geting arguments on on_name_request\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flag & EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER))
|
if (reply != EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER)
|
||||||
{
|
{
|
||||||
printf("error name already in use\n");
|
printf("error name already in use\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -193,7 +193,7 @@ static void
|
||||||
on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
|
on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
|
||||||
{
|
{
|
||||||
EDBus_Service_Interface *iface;
|
EDBus_Service_Interface *iface;
|
||||||
unsigned int flag;
|
unsigned int reply;
|
||||||
|
|
||||||
iface = data;
|
iface = data;
|
||||||
if (edbus_message_error_get(msg, NULL, NULL))
|
if (edbus_message_error_get(msg, NULL, NULL))
|
||||||
|
@ -202,13 +202,13 @@ on_name_request(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
|
||||||
return;
|
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");
|
printf("error geting arguments on on_name_request\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flag & EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER))
|
if (reply != EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER)
|
||||||
{
|
{
|
||||||
printf("error name already in use\n");
|
printf("error name already in use\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue