sdp_profile_desc_t profile[1];
sdp_list_t *aproto, *aproto1, *proto[2], *proto1[2];
sdp_record_t *record;
- sdp_data_t *psm, *version, *features;
+ sdp_data_t *psm[2], *version, *features;
uint16_t lp = AVCTP_CONTROL_PSM, ap = AVCTP_BROWSING_PSM;
uint16_t avrcp_ver = 0x0105, avctp_ver = 0x0103;
uint16_t feat = ( AVRCP_FEATURE_CATEGORY_1 |
/* Protocol Descriptor List */
sdp_uuid16_create(&l2cap, L2CAP_UUID);
proto[0] = sdp_list_append(0, &l2cap);
- psm = sdp_data_alloc(SDP_UINT16, &lp);
- proto[0] = sdp_list_append(proto[0], psm);
+ psm[0] = sdp_data_alloc(SDP_UINT16, &lp);
+ proto[0] = sdp_list_append(proto[0], psm[0]);
apseq = sdp_list_append(0, proto[0]);
sdp_uuid16_create(&avctp, AVCTP_UUID);
/* Additional Protocol Descriptor List */
sdp_uuid16_create(&l2cap, L2CAP_UUID);
proto1[0] = sdp_list_append(0, &l2cap);
- psm = sdp_data_alloc(SDP_UINT16, &ap);
- proto1[0] = sdp_list_append(proto1[0], psm);
+ psm[1] = sdp_data_alloc(SDP_UINT16, &ap);
+ proto1[0] = sdp_list_append(proto1[0], psm[1]);
apseq1 = sdp_list_append(0, proto1[0]);
sdp_uuid16_create(&avctp, AVCTP_UUID);
sdp_set_info_attr(record, "AVRCP CT", 0, 0);
- free(psm);
+ free(psm[0]);
+ free(psm[1]);
free(version);
sdp_list_free(proto[0], 0);
sdp_list_free(proto[1], 0);
sdp_list_free(apseq, 0);
sdp_list_free(proto1[0], 0);
sdp_list_free(proto1[1], 0);
+ sdp_list_free(aproto1, 0);
sdp_list_free(apseq1, 0);
sdp_list_free(pfseq, 0);
sdp_list_free(aproto, 0);