eldbus - only do syntax checks if libdbus is new enough

This commit is contained in:
Carsten Haitzler 2015-10-06 11:29:16 +09:00
parent 571c67c6a5
commit 7d0c5a9423
1 changed files with 4 additions and 0 deletions

View File

@ -108,6 +108,9 @@ eldbus_message_method_call_new(const char *dest, const char *path, const char *i
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(method, NULL);
#ifdef DBUS_SYNTAX_H
// added to libdbus:
// f426c6cddd158d6324923f28117bc8e512d6f64f Fri Feb 24 12:43:55 2012 +0000
if (!dbus_validate_bus_name(dest, NULL))
{
ERR("Invalid bus name '%s'", dest);
@ -123,6 +126,7 @@ eldbus_message_method_call_new(const char *dest, const char *path, const char *i
ERR("Invalid interface '%s'", iface);
return NULL;
}
#endif
msg = eldbus_message_new(EINA_TRUE);
EINA_SAFETY_ON_NULL_GOTO(msg, fail);