summaryrefslogtreecommitdiff
path: root/legacy/edbus/src/lib/edbus_message.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-17 18:24:54 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-17 18:24:54 +0000
commitada326a184ea76b011051bccfe5baad3cf537942 (patch)
treef76c3cb614cebe803352acf376adb92d93c82d94 /legacy/edbus/src/lib/edbus_message.c
parent8af6b6620f1b5ac0df12ae05ff3c5fa16be20aed (diff)
edbus: avoid using dbus_signature_iter_get_signature when not needed
SVN revision: 81174
Diffstat (limited to '')
-rw-r--r--legacy/edbus/src/lib/edbus_message.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/legacy/edbus/src/lib/edbus_message.c b/legacy/edbus/src/lib/edbus_message.c
index eeab1db1bc..d1730f7e2a 100644
--- a/legacy/edbus/src/lib/edbus_message.c
+++ b/legacy/edbus/src/lib/edbus_message.c
@@ -421,7 +421,7 @@ _edbus_message_arguments_vset(EDBus_Message *msg, const char *signature, va_list
421{ 421{
422 DBusSignatureIter signature_iter; 422 DBusSignatureIter signature_iter;
423 EDBus_Message_Iter *iter; 423 EDBus_Message_Iter *iter;
424 char *type; 424 int type;
425 Eina_Bool r = EINA_TRUE; 425 Eina_Bool r = EINA_TRUE;
426 426
427 if (!signature[0]) return EINA_TRUE; 427 if (!signature[0]) return EINA_TRUE;
@@ -432,21 +432,22 @@ _edbus_message_arguments_vset(EDBus_Message *msg, const char *signature, va_list
432 EINA_SAFETY_ON_FALSE_RETURN_VAL(iter->writable, EINA_FALSE); 432 EINA_SAFETY_ON_FALSE_RETURN_VAL(iter->writable, EINA_FALSE);
433 433
434 dbus_signature_iter_init(&signature_iter, signature); 434 dbus_signature_iter_init(&signature_iter, signature);
435 while ((type = dbus_signature_iter_get_signature(&signature_iter))) 435 while ((type = dbus_signature_iter_get_current_type(&signature_iter)))
436 { 436 {
437 if (dbus_type_is_basic(type[0])) 437 if (dbus_type_is_basic(type))
438 r = append_basic(type[0], MAKE_PTR_FROM_VA_LIST(ap), 438 r = append_basic(type, MAKE_PTR_FROM_VA_LIST(ap),
439 &iter->dbus_iterator); 439 &iter->dbus_iterator);
440 else 440 else
441 { 441 {
442 ERR("sig = %s | edbus_message_arguments_set() and \ 442 ERR("sig = %s | edbus_message_arguments_set() and \
443 edbus_message_arguments_vset() only support basic types, \ 443 edbus_message_arguments_vset() only support basic types, \
444 to complex types use edbus_message_iter_* functions", signature); 444 to complex types use edbus_message_iter_* functions",
445 signature);
445 r = EINA_FALSE; 446 r = EINA_FALSE;
446 } 447 }
447 448
448 dbus_free(type); 449 if (!r || !dbus_signature_iter_next(&signature_iter))
449 if (!r || !dbus_signature_iter_next(&signature_iter)) break; 450 break;
450 } 451 }
451 452
452 return r; 453 return r;