diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-06-09 17:01:55 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-06-09 17:01:55 +0000 |
commit | 3d3cdef8da6b3e1b14c3cdccda8c099cbad4f3ae (patch) | |
tree | 439996832d60de76a3c1204a65b836f7aab671ac /hcid/device.c | |
parent | d481a1e8d98363d244ff7e75912a4606e887d853 (diff) |
Append full record to discover service results
Diffstat (limited to 'hcid/device.c')
-rw-r--r-- | hcid/device.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/hcid/device.c b/hcid/device.c index 57986f88..9dc7f4e9 100644 --- a/hcid/device.c +++ b/hcid/device.c @@ -61,6 +61,8 @@ #include "error.h" #include "glib-helper.h" #include "agent.h" +#include "dbus-sdp.h" +#include "sdp-xml.h" #define MAX_DEVICES 16 @@ -1266,13 +1268,21 @@ proceed: for (seq = recs; seq; seq = next) { sdp_record_t *rec = (sdp_record_t *) seq->data; - const char *val = ""; + sdp_buf_t result; if (!rec) break; - /* FIXME add the real record string */ - iter_append_record(&dict, rec->handle, val); + memset(&result, 0, sizeof(sdp_buf_t)); + + convert_sdp_record_to_xml(rec, &result, + append_and_grow_string); + + if (result.data) { + const char *val = result.data; + iter_append_record(&dict, rec->handle, val); + free(result.data); + } next = seq->next; } |