summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-04 17:53:46 +0900
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-10-04 08:42:28 -0400
commitd7c27e407b0bad663891faa667d76fa5d8438b58 (patch)
tree5a3efbbfa22cb6dc8c4aadd50532932a87e044db
parenta2c2b0fa0373d7add8d5e2b2b7362379797dca6c (diff)
eldbus - make method calls less crasy since libdbus likes to abort
changes zmike made to e's systray make e abort due to libdbus seeing the bus name as invalid. it actually is. it's /org/ayatana/NotificationItem/steam for example - instead of or.whatever.blah - thuis e aborts continually if you run steam at all. eldbus should be more crash-proof thus this adds checks so dbus fun doesnt cause an app to crash if it happens to call incorrect dbus names. @fix
-rw-r--r--src/lib/eldbus/eldbus_message.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/eldbus/eldbus_message.c b/src/lib/eldbus/eldbus_message.c
index 03b8d642c2..5b8763dd4c 100644
--- a/src/lib/eldbus/eldbus_message.c
+++ b/src/lib/eldbus/eldbus_message.c
@@ -108,6 +108,22 @@ eldbus_message_method_call_new(const char *dest, const char *path, const char *i
108 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL); 108 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
109 EINA_SAFETY_ON_NULL_RETURN_VAL(method, NULL); 109 EINA_SAFETY_ON_NULL_RETURN_VAL(method, NULL);
110 110
111 if (!dbus_validate_bus_name(dest, NULL))
112 {
113 ERR("Invalid bus name '%s'", dest);
114 return NULL;
115 }
116 if (!dbus_validate_path(path, NULL))
117 {
118 ERR("Invalid path '%s'", path);
119 return NULL;
120 }
121 if (!dbus_validate_interface(iface, NULL))
122 {
123 ERR("Invalid interface '%s'", iface);
124 return NULL;
125 }
126
111 msg = eldbus_message_new(EINA_TRUE); 127 msg = eldbus_message_new(EINA_TRUE);
112 EINA_SAFETY_ON_NULL_GOTO(msg, fail); 128 EINA_SAFETY_ON_NULL_GOTO(msg, fail);
113 129