summaryrefslogtreecommitdiff
path: root/src/bin/eldbus
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-05-04 20:36:58 -0400
committerMike Blumenkrantz <zmike@samsung.com>2014-05-04 20:37:27 -0400
commitcaf27c4fc37de8c2ba7bdd6486fe40aadc396fb0 (patch)
tree6b0d6990658cd145c96dd517b77ce357d37cbba4 /src/bin/eldbus
parentfaf8f51ff6b6a876673ae3d07a802700d1f288d3 (diff)
eldbus-codegen no longer passes garbage values to error callbacks
@fix
Diffstat (limited to 'src/bin/eldbus')
-rw-r--r--src/bin/eldbus/source_client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/eldbus/source_client.c b/src/bin/eldbus/source_client.c
index d21bc77d90..af21c29171 100644
--- a/src/bin/eldbus/source_client.c
+++ b/src/bin/eldbus/source_client.c
@@ -8,6 +8,14 @@ static const char *code_prefix = NULL;
8static char buffer[4028]; 8static char buffer[4028];
9 9
10static const char * 10static const char *
11null_or_zero(const char *type)
12{
13 if (type[0] == 's' || type[0] == 'o' || type[0] == 'v' || type[1])
14 return "NULL";
15 return "0";
16}
17
18static const char *
11prefix_append(const char *text) 19prefix_append(const char *text)
12{ 20{
13 if (code_prefix) 21 if (code_prefix)
@@ -252,7 +260,7 @@ source_client_simple_method_callback_generate(const DBus_Method *method, Eina_St
252 continue; 260 continue;
253 eina_strbuf_append(full_signature, arg->type); 261 eina_strbuf_append(full_signature, arg->type);
254 eina_strbuf_append_printf(h, ", %s%s", dbus_type2c_type(arg->type), arg->c_name); 262 eina_strbuf_append_printf(h, ", %s%s", dbus_type2c_type(arg->type), arg->c_name);
255 eina_strbuf_append_printf(c_code, " %s%s;\n", dbus_type2c_type(arg->type), arg->c_name); 263 eina_strbuf_append_printf(c_code, " %s%s = %s;\n", dbus_type2c_type(arg->type), arg->c_name, null_or_zero(arg->type));
256 eina_strbuf_append_printf(end_cb, ", %s", arg->c_name); 264 eina_strbuf_append_printf(end_cb, ", %s", arg->c_name);
257 eina_strbuf_append_printf(arguments_get, ", &%s", arg->c_name); 265 eina_strbuf_append_printf(arguments_get, ", &%s", arg->c_name);
258 } 266 }
@@ -416,14 +424,6 @@ prop_cb_get(const DBus_Property *prop)
416 } 424 }
417} 425}
418 426
419static const char *
420null_or_zero(const char *type)
421{
422 if (type[0] == 's' || type[0] == 'o' || type[0] == 'v' || type[1])
423 return "NULL";
424 return "0";
425}
426
427static void 427static void
428source_client_property_generate_get(const DBus_Property *prop, Eina_Strbuf *c_code, Eina_Strbuf *h) 428source_client_property_generate_get(const DBus_Property *prop, Eina_Strbuf *c_code, Eina_Strbuf *h)
429{ 429{