diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-05-02 21:40:30 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-05-02 21:40:30 +0000 |
commit | 233bd39dee08afc5176b203e6348184da56d7bff (patch) | |
tree | a6314f3ba006ce9ee50021ac0f216a6bf832e5d6 /src | |
parent | edb4586c5bd45aaa69c0910150f0012ca3251c7e (diff) |
Add sdp_get_add_access_protos() function
Diffstat (limited to 'src')
-rw-r--r-- | src/sdp.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -1310,6 +1310,30 @@ int sdp_get_access_protos(const sdp_record_t *rec, sdp_list_t **pap) return 0; } +int sdp_get_add_access_protos(const sdp_record_t *rec, sdp_list_t **pap) +{ + sdp_data_t *pdlist, *curr; + sdp_list_t *ap = 0; + + pdlist = sdp_data_get(rec, SDP_ATTR_ADD_PROTO_DESC_LIST); + if (pdlist == NULL) { + errno = ENODATA; + return -1; + } + SDPDBG("AP type : 0%x\n", pdlist->dtd); + + pdlist = pdlist->val.dataseq; + + for (; pdlist; pdlist = pdlist->next) { + sdp_list_t *pds = 0; + for (curr = pdlist->val.dataseq; curr; curr = curr->next) + pds = sdp_list_append(pds, curr->val.dataseq); + ap = sdp_list_append(ap, pds); + } + *pap = ap; + return 0; +} + int sdp_get_uuidseq_attr(const sdp_record_t *rec, uint16_t attr, sdp_list_t **seqp) { sdp_data_t *sdpdata = sdp_data_get(rec, attr); |