summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2013-01-15 14:33:48 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2013-01-15 14:33:48 +0000
commitd4da99698e5ce80c64d9ba4617e40062f8bde50c (patch)
treed15620db5b1d7195f958274df8177ee57938c5b4 /src/examples
parentca0cc1cbc983954246e8e4a04dd7160301c2eb07 (diff)
efl/edbus: make all edbus_*_send() methods unref its msg
There's no reason to keep a msg after it was sent. Before this patch we had edbus_service_signal_send() unref'ing its msg and all the others not. Also, several users (particularly the edbus_proxy_send() ones) were forgetting to unref the msg. This patch makes all these methods unref the message after it has been succesfully sent: - edbus_connection_send() - edbus_object_send() - edbus_proxy_send() - edbus_service_signal_send() SVN revision: 82807
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/edbus/complex-types-client-eina-value.c2
-rw-r--r--src/examples/edbus/complex-types.c4
-rw-r--r--src/examples/edbus/server.c1
3 files changed, 0 insertions, 7 deletions
diff --git a/src/examples/edbus/complex-types-client-eina-value.c b/src/examples/edbus/complex-types-client-eina-value.c
index bf0ba902e0..cde7c9b2ce 100644
--- a/src/examples/edbus/complex-types-client-eina-value.c
+++ b/src/examples/edbus/complex-types-client-eina-value.c
@@ -291,14 +291,12 @@ main(void)
291 msg = edbus_proxy_method_call_new(proxy, "ReceiveArrayOfStringIntWithSize"); 291 msg = edbus_proxy_method_call_new(proxy, "ReceiveArrayOfStringIntWithSize");
292 _fill_receive_array_of_string_int_with_size(msg, size_of_array, array_string); 292 _fill_receive_array_of_string_int_with_size(msg, size_of_array, array_string);
293 edbus_proxy_send(proxy, msg, on_receive_array_with_size, NULL, -1); 293 edbus_proxy_send(proxy, msg, on_receive_array_with_size, NULL, -1);
294 edbus_message_unref(msg);
295 294
296 edbus_proxy_call(proxy, "SendArray", on_send_array, NULL, -1 , ""); 295 edbus_proxy_call(proxy, "SendArray", on_send_array, NULL, -1 , "");
297 296
298 msg = edbus_proxy_method_call_new(proxy, "PlusOne"); 297 msg = edbus_proxy_method_call_new(proxy, "PlusOne");
299 _fill_plus_one(msg, 14); 298 _fill_plus_one(msg, 14);
300 edbus_proxy_send(proxy, msg, on_plus_one, NULL, -1); 299 edbus_proxy_send(proxy, msg, on_plus_one, NULL, -1);
301 edbus_message_unref(msg);
302 300
303 edbus_proxy_event_callback_add(proxy, 301 edbus_proxy_event_callback_add(proxy,
304 EDBUS_PROXY_EVENT_PROPERTY_CHANGED, 302 EDBUS_PROXY_EVENT_PROPERTY_CHANGED,
diff --git a/src/examples/edbus/complex-types.c b/src/examples/edbus/complex-types.c
index 6884d0955d..e60badfaff 100644
--- a/src/examples/edbus/complex-types.c
+++ b/src/examples/edbus/complex-types.c
@@ -211,7 +211,6 @@ main(void)
211 edbus_message_iter_container_close(iter, array_of_string); 211 edbus_message_iter_container_close(iter, array_of_string);
212 pending = edbus_proxy_send(test2_proxy, msg, on_receive_array, NULL, -1); 212 pending = edbus_proxy_send(test2_proxy, msg, on_receive_array, NULL, -1);
213 if (!pending) printf("Error in edbus_proxy_send()\n\n"); 213 if (!pending) printf("Error in edbus_proxy_send()\n\n");
214 edbus_message_unref(msg);
215 214
216 msg = edbus_proxy_method_call_new(test2_proxy, "ReceiveArrayOfStringIntWithSize"); 215 msg = edbus_proxy_method_call_new(test2_proxy, "ReceiveArrayOfStringIntWithSize");
217 iter = edbus_message_iter_get(msg); 216 iter = edbus_message_iter_get(msg);
@@ -226,7 +225,6 @@ main(void)
226 } 225 }
227 edbus_message_iter_container_close(iter, array_of_string); 226 edbus_message_iter_container_close(iter, array_of_string);
228 pending = edbus_proxy_send(test2_proxy, msg, on_receive_array_with_size, NULL, -1); 227 pending = edbus_proxy_send(test2_proxy, msg, on_receive_array_with_size, NULL, -1);
229 edbus_message_unref(msg);
230 228
231 msg = edbus_proxy_method_call_new(test2_proxy, "SendVariantData"); 229 msg = edbus_proxy_method_call_new(test2_proxy, "SendVariantData");
232 iter = edbus_message_iter_get(msg); 230 iter = edbus_message_iter_get(msg);
@@ -234,7 +232,6 @@ main(void)
234 edbus_message_iter_basic_append(variant, 's', "test"); 232 edbus_message_iter_basic_append(variant, 's', "test");
235 edbus_message_iter_container_close(iter, variant); 233 edbus_message_iter_container_close(iter, variant);
236 pending = edbus_proxy_send(test2_proxy, msg, on_send_variant, NULL, -1); 234 pending = edbus_proxy_send(test2_proxy, msg, on_send_variant, NULL, -1);
237 edbus_message_unref(msg);
238 235
239 msg = edbus_proxy_method_call_new(test2_proxy, "DoubleContainner"); 236 msg = edbus_proxy_method_call_new(test2_proxy, "DoubleContainner");
240 iter = edbus_message_iter_get(msg); 237 iter = edbus_message_iter_get(msg);
@@ -260,7 +257,6 @@ main(void)
260 } 257 }
261 edbus_message_iter_container_close(iter, array_itr); 258 edbus_message_iter_container_close(iter, array_itr);
262 edbus_proxy_send(test2_proxy, msg, NULL, NULL, -1); 259 edbus_proxy_send(test2_proxy, msg, NULL, NULL, -1);
263 edbus_message_unref(msg);
264 260
265 pending = edbus_proxy_call(test2_proxy, "SendArrayInt", on_send_array_int, NULL, 261 pending = edbus_proxy_call(test2_proxy, "SendArrayInt", on_send_array_int, NULL,
266 -1 , ""); 262 -1 , "");
diff --git a/src/examples/edbus/server.c b/src/examples/edbus/server.c
index 45eeab8c22..dd606bd6b1 100644
--- a/src/examples/edbus/server.c
+++ b/src/examples/edbus/server.c
@@ -130,7 +130,6 @@ _resp_async(void *data)
130 EDBus_Message *msg = data; 130 EDBus_Message *msg = data;
131 edbus_message_arguments_append(msg, "s", "Async test ok"); 131 edbus_message_arguments_append(msg, "s", "Async test ok");
132 edbus_connection_send(conn, msg, NULL, NULL, -1); 132 edbus_connection_send(conn, msg, NULL, NULL, -1);
133 edbus_message_unref(msg);
134 return ECORE_CALLBACK_CANCEL; 133 return ECORE_CALLBACK_CANCEL;
135} 134}
136 135