/* Function for finding a record of a write buffer allocation.  */
static pdb_buffer_record_t* write_buffer_record_find(pm_peer_id_t peer_id, pm_peer_data_id_t data_id)
/* Function for finding a record of a write buffer allocation.  */
static pdb_buffer_record_t* write_buffer_record_find(pm_peer_id_t peer_id, pm_peer_data_id_t data_id)
{
    int index = 0;
    pdb_buffer_record_t * p_record = write_buffer_record_find_next(peer_id, &index);
    while ((p_record != NULL) && (p_record->data_id != data_id))
    {
        index++;
        p_record = write_buffer_record_find_next(peer_id, &index);
    }
    return p_record;
}