summaryrefslogtreecommitdiffstats
path: root/sdpd/request.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-08-05 02:59:23 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-08-05 02:59:23 +0000
commit028619a565a8dd60da011170f8ce326de78a1e47 (patch)
tree5688c11481f50ae3f16194dba8f3dbbffc46450e /sdpd/request.c
parentb0ba2fc57a3da851aa0bb7ff6bbf78347c838221 (diff)
Add support for device specific SDP records
Diffstat (limited to 'sdpd/request.c')
-rw-r--r--sdpd/request.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sdpd/request.c b/sdpd/request.c
index 356ce1d8..07051f9f 100644
--- a/sdpd/request.c
+++ b/sdpd/request.c
@@ -298,11 +298,12 @@ static int service_search_req(sdp_req_t *req, sdp_buf_t *buf)
handleSize = 0;
for (; list && rsp_count < expected; list = list->next) {
- sdp_record_t *rec = (sdp_record_t *)list->data;
+ sdp_record_t *rec = (sdp_record_t *) list->data;
SDPDBG("Checking svcRec : 0x%x\n", rec->handle);
- if (sdp_match_uuid(pattern, rec->pattern) > 0) {
+ if (sdp_match_uuid(pattern, rec->pattern) > 0 &&
+ sdp_check_access(rec->handle, &req->device)) {
rsp_count++;
sdp_put_unaligned(htonl(rec->handle), (uint32_t *)pdata);
pdata += sizeof(uint32_t);
@@ -672,8 +673,9 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
/* no continuation state -> create new response */
sdp_list_t *p;
for (p = svcList; p; p = p->next) {
- sdp_record_t *rec = (sdp_record_t *)p->data;
- if (sdp_match_uuid(pattern, rec->pattern) > 0) {
+ sdp_record_t *rec = (sdp_record_t *) p->data;
+ if (sdp_match_uuid(pattern, rec->pattern) > 0 &&
+ sdp_check_access(rec->handle, &req->device)) {
rsp_count++;
status = extract_attrs(rec, seq, dtd, &tmpbuf);