Lines Matching refs:p_rec

53 tSDP_RECORD* sdp_db_service_search(tSDP_RECORD* p_rec, tSDP_UUID_SEQ* p_seq) {  in sdp_db_service_search()  argument
60 if (!p_rec) in sdp_db_service_search()
61 p_rec = &sdp_cb.server_db.record[0]; in sdp_db_service_search()
63 p_rec++; in sdp_db_service_search()
67 for (; p_rec < p_end; p_rec++) { in sdp_db_service_search()
69 p_attr = &p_rec->attribute[0]; in sdp_db_service_search()
70 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in sdp_db_service_search()
84 if (xx == p_rec->num_attributes) break; in sdp_db_service_search()
88 if (yy == p_seq->num_uids) return (p_rec); in sdp_db_service_search()
145 tSDP_RECORD* p_rec; in sdp_db_find_record() local
149 for (p_rec = &sdp_cb.server_db.record[0]; p_rec < p_end; p_rec++) { in sdp_db_find_record()
150 if (p_rec->record_handle == handle) return (p_rec); in sdp_db_find_record()
169 tSDP_ATTRIBUTE* sdp_db_find_attr_in_rec(tSDP_RECORD* p_rec, uint16_t start_attr, in sdp_db_find_attr_in_rec() argument
175 for (xx = 0, p_at = &p_rec->attribute[0]; xx < p_rec->num_attributes; in sdp_db_find_attr_in_rec()
299 tSDP_RECORD* p_rec = &sdp_cb.server_db.record[0]; in SDP_DeleteRecord() local
311 for (xx = 0; xx < sdp_cb.server_db.num_records; xx++, p_rec++) { in SDP_DeleteRecord()
312 if (p_rec->record_handle == handle) { in SDP_DeleteRecord()
314 for (yy = xx; yy < sdp_cb.server_db.num_records - 1; yy++, p_rec++) { in SDP_DeleteRecord()
315 *p_rec = *(p_rec + 1); in SDP_DeleteRecord()
318 for (zz = 0; zz < p_rec->num_attributes; zz++) in SDP_DeleteRecord()
319 p_rec->attribute[zz].value_ptr -= sizeof(tSDP_RECORD); in SDP_DeleteRecord()
358 tSDP_RECORD* p_rec = &sdp_cb.server_db.record[0]; in SDP_AddAttribute() local
392 for (zz = 0; zz < sdp_cb.server_db.num_records; zz++, p_rec++) { in SDP_AddAttribute()
393 if (p_rec->record_handle == handle) { in SDP_AddAttribute()
394 tSDP_ATTRIBUTE* p_attr = &p_rec->attribute[0]; in SDP_AddAttribute()
397 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in SDP_AddAttribute()
406 if (p_rec->num_attributes == SDP_MAX_REC_ATTR) return (false); in SDP_AddAttribute()
409 if (xx == p_rec->num_attributes) in SDP_AddAttribute()
410 p_attr = &p_rec->attribute[p_rec->num_attributes]; in SDP_AddAttribute()
413 for (yy = p_rec->num_attributes; yy > xx; yy--) in SDP_AddAttribute()
414 p_rec->attribute[yy] = p_rec->attribute[yy - 1]; in SDP_AddAttribute()
421 if (p_rec->free_pad_ptr + attr_len >= SDP_MAX_PAD_LEN) { in SDP_AddAttribute()
426 attr_len, SDP_MAX_PAD_LEN - p_rec->free_pad_ptr); in SDP_AddAttribute()
428 attr_len = SDP_MAX_PAD_LEN - p_rec->free_pad_ptr; in SDP_AddAttribute()
429 p_val[SDP_MAX_PAD_LEN - p_rec->free_pad_ptr] = '\0'; in SDP_AddAttribute()
430 p_val[SDP_MAX_PAD_LEN - p_rec->free_pad_ptr + 1] = '\0'; in SDP_AddAttribute()
437 memcpy(&p_rec->attr_pad[p_rec->free_pad_ptr], p_val, (size_t)attr_len); in SDP_AddAttribute()
438 p_attr->value_ptr = &p_rec->attr_pad[p_rec->free_pad_ptr]; in SDP_AddAttribute()
439 p_rec->free_pad_ptr += attr_len; in SDP_AddAttribute()
450 p_rec->num_attributes++; in SDP_AddAttribute()
794 tSDP_RECORD* p_rec = &sdp_cb.server_db.record[0]; in SDP_DeleteAttribute() local
799 for (uint16_t xx = 0; xx < sdp_cb.server_db.num_records; xx++, p_rec++) { in SDP_DeleteAttribute()
800 if (p_rec->record_handle == handle) { in SDP_DeleteAttribute()
801 tSDP_ATTRIBUTE* p_attr = &p_rec->attribute[0]; in SDP_DeleteAttribute()
805 for (uint16_t yy = 0; yy < p_rec->num_attributes; yy++, p_attr++) { in SDP_DeleteAttribute()
811 for (uint16_t zz = 0; zz < p_rec->num_attributes; zz++) { in SDP_DeleteAttribute()
812 if (p_rec->attribute[zz].value_ptr > pad_ptr) in SDP_DeleteAttribute()
813 p_rec->attribute[zz].value_ptr -= len; in SDP_DeleteAttribute()
818 p_rec->num_attributes--; in SDP_DeleteAttribute()
820 for (uint16_t zz = xx; zz < p_rec->num_attributes; zz++, p_attr++) { in SDP_DeleteAttribute()
827 (p_rec->free_pad_ptr - ((pad_ptr + len) - &p_rec->attr_pad[0])); in SDP_DeleteAttribute()
831 p_rec->free_pad_ptr -= len; in SDP_DeleteAttribute()