diff --git a/lib/sdp.c b/lib/sdp.c
index ba47d20..ff2d36d 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
int data_type = 0;
uint8_t *p = buf->data + buf->data_size;
- *p++ = dtd;
+ *p = dtd;
data_type = sdp_get_data_type(buf, dtd);
buf->data_size += data_type;
*p++ = SDP_UINT16;
buf->data_size = sizeof(uint8_t);
bt_put_unaligned(htons(attr), (uint16_t *) p);
- p += sizeof(uint16_t);
buf->data_size += sizeof(uint16_t);
}
}
sdp_uuid16_create(uuid, ntohs(bt_get_unaligned((uint16_t *) p)));
*scanned += sizeof(uint16_t);
- p += sizeof(uint16_t);
} else if (type == SDP_UUID32) {
if (bufsize < (int) sizeof(uint32_t)) {
SDPERR("Not enough room for 32-bit UUID");
}
sdp_uuid32_create(uuid, ntohl(bt_get_unaligned((uint32_t *) p)));
*scanned += sizeof(uint32_t);
- p += sizeof(uint32_t);
} else {
if (bufsize < (int) sizeof(uint128_t)) {
SDPERR("Not enough room for 128-bit UUID");
}
sdp_uuid128_create(uuid, p);
*scanned += sizeof(uint128_t);
- p += sizeof(uint128_t);
}
return 0;
}
if (dst->data_size == 0 && dtd == 0) {
/* create initial sequence */
*p = SDP_SEQ8;
- p += sizeof(uint8_t);
dst->data_size += sizeof(uint8_t);
/* reserve space for sequence size */
- p += sizeof(uint8_t);
dst->data_size += sizeof(uint8_t);
}
short offset = sizeof(uint8_t) + sizeof(uint8_t);
memmove(dst->data + offset + 1, dst->data + offset,
dst->data_size - offset);
- p = dst->data;
*p = SDP_SEQ16;
- p += sizeof(uint8_t);
dst->data_size += 1;
}
- p = dst->data;
dtd = *(uint8_t *) p;
p += sizeof(uint8_t);
switch (dtd) {
uint32_t reqsize = 0, _reqsize;
uint32_t rspsize = 0, rsplen;
int seqlen = 0;
- int total_rec_count, rec_count;
+ int rec_count;
unsigned scanned, pdata_len;
uint8_t *pdata, *_pdata;
uint8_t *reqbuf, *rspbuf;
}
/* net service record match count */
- total_rec_count = ntohs(bt_get_unaligned((uint16_t *) pdata));
pdata += sizeof(uint16_t);
scanned += sizeof(uint16_t);
pdata_len -= sizeof(uint16_t);
status = ntohs(bt_get_unaligned((uint16_t *) pdata));
size = ntohs(rsphdr->plen);
- /* error code + error info */
- plen = size;
goto end;
default:
t->err = EPROTO;
diff --git a/src/sdpd-request.c b/src/sdpd-request.c
index d24a0da..ddec935 100644
--- a/src/sdpd-request.c
+++ b/src/sdpd-request.c
} else {
/* set "null" continuation state */
*pdata = 0;
- pdata += sizeof(uint8_t);
length += sizeof(uint8_t);
}
buf->data_size += length;
diff --git a/src/sdpd-service.c b/src/sdpd-service.c
index 96799ed..de11562 100644
--- a/src/sdpd-service.c
+++ b/src/sdpd-service.c
int status = 0;
/* extract service record handle */
- p += sizeof(uint32_t);
rec = sdp_record_find(handle);
if (rec) {