summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-11-14 18:56:44 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-11-14 18:56:44 +0000
commit27587b5eca97e29c90a0cc28b0cd77f5cca4da02 (patch)
tree7c4c8a14823685b3800a2bed036a0946d3c75882 /hcid
parentfd2e427c88d270d6dc7f47e8bed4eee916a8598c (diff)
Appends a block of fixed-length bytes instead of call multiple times dbus_message_iter_append_basic
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-sdp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index 6321ac9b..af698395 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -357,7 +357,7 @@ static void remote_svc_rec_completed_cb(uint8_t type, uint16_t err, uint8_t *rsp
DBusMessage *reply;
DBusMessageIter iter, array_iter;
const char *src, *dst;
- int i, scanned;
+ int scanned;
if (!ctxt)
return;
@@ -409,9 +409,8 @@ static void remote_svc_rec_completed_cb(uint8_t type, uint16_t err, uint8_t *rsp
sdp_record_free(rec);
- for (i = 0; i < size; i++)
- dbus_message_iter_append_basic(&array_iter,
- DBUS_TYPE_BYTE, &rsp[i]);
+ dbus_message_iter_append_fixed_array(&array_iter,
+ DBUS_TYPE_BYTE, &rsp, size);
done:
dbus_message_iter_close_container(&iter, &array_iter);