diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-06-30 14:31:37 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-06-30 14:31:37 +0300 |
commit | da8ebafe5f67103ed8a1d4fd21bbd6b02b62221e (patch) | |
tree | 2e1ba58dc68c27d70e7ab4117ec064c977d94114 /src/sdpd-service.c | |
parent | b09e5f88928d230f4c1c3bcdb9c53656b513bcbd (diff) | |
download | bluez-da8ebafe5f67103ed8a1d4fd21bbd6b02b62221e.tar.gz |
Coding style fixes
Diffstat (limited to 'src/sdpd-service.c')
-rw-r--r-- | src/sdpd-service.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/sdpd-service.c b/src/sdpd-service.c index 927ff17de..f19e1d4e1 100644 --- a/src/sdpd-service.c +++ b/src/sdpd-service.c @@ -395,7 +395,7 @@ int add_record_to_server(const bdaddr_t *src, sdp_record_t *rec) return -1; } else { if (sdp_record_find(rec->handle)) - return -1; + return -1; } debug("Adding record with handle 0x%05x", rec->handle); @@ -447,8 +447,10 @@ int remove_record_from_server(uint32_t handle) return 0; } -// FIXME: refactor for server-side -static sdp_record_t *extract_pdu_server(bdaddr_t *device, uint8_t *p, unsigned int bufsize, uint32_t handleExpected, int *scanned) +/* FIXME: refactor for server-side */ +static sdp_record_t *extract_pdu_server(bdaddr_t *device, uint8_t *p, + unsigned int bufsize, + uint32_t handleExpected, int *scanned) { int extractStatus = -1, localExtractedLength = 0; uint8_t dtd; @@ -472,7 +474,8 @@ static sdp_record_t *extract_pdu_server(bdaddr_t *device, uint8_t *p, unsigned i SDPDBG("Look ahead attr id : %d", lookAheadAttrId); if (lookAheadAttrId == SDP_ATTR_RECORD_HANDLE) { - if (bufsize < (sizeof(uint8_t) * 2) + sizeof(uint16_t) + sizeof(uint32_t)) { + if (bufsize < (sizeof(uint8_t) * 2) + + sizeof(uint16_t) + sizeof(uint32_t)) { SDPDBG("Unexpected end of packet"); return NULL; } @@ -508,12 +511,13 @@ static sdp_record_t *extract_pdu_server(bdaddr_t *device, uint8_t *p, unsigned i break; } - SDPDBG("Extract PDU, sequenceLength: %d localExtractedLength: %d", seqlen, localExtractedLength); + SDPDBG("Extract PDU, sequenceLength: %d localExtractedLength: %d", + seqlen, localExtractedLength); dtd = *(uint8_t *) p; attrId = ntohs(bt_get_unaligned((uint16_t *) (p + attrSize))); attrSize += sizeof(uint16_t); - + SDPDBG("DTD of attrId : %d Attr id : 0x%x", dtd, attrId); pAttr = sdp_extract_attr(p + attrSize, bufsize - attrSize, @@ -594,9 +598,9 @@ success: /* if the browse group descriptor is NULL, * ensure that the record belongs to the ROOT group */ if (sdp_data_get(rec, SDP_ATTR_BROWSE_GRP_LIST) == NULL) { - uuid_t uuid; - sdp_uuid16_create(&uuid, PUBLIC_BROWSE_GROUP); - sdp_pattern_add_uuid(rec, &uuid); + uuid_t uuid; + sdp_uuid16_create(&uuid, PUBLIC_BROWSE_GROUP); + sdp_pattern_add_uuid(rec, &uuid); } update_db_timestamp(); @@ -636,7 +640,8 @@ int service_update_req(sdp_req_t *req, sdp_buf_t *rsp) SDPDBG("SvcRecOld: %p", orec); if (orec) { - sdp_record_t *nrec = extract_pdu_server(BDADDR_ANY, p, bufsize, handle, &scanned); + sdp_record_t *nrec = extract_pdu_server(BDADDR_ANY, p, bufsize, + handle, &scanned); if (nrec && handle == nrec->handle) { update_db_timestamp(); update_svclass_list(BDADDR_ANY); |