0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

BMP: Remove useless buffer

This commit is contained in:
Ondrej Zajicek 2023-08-01 18:39:38 +02:00
parent 8ded8baba2
commit aec21cda24

View File

@ -654,23 +654,18 @@ bmp_route_monitor_commit(void *p_)
buffer payload
= bmp_buffer_alloc(p->buffer_mpool, DEFAULT_MEM_BLOCK_SIZE);
buffer update_msgs
= bmp_buffer_alloc(p->buffer_mpool, BGP_MAX_EXT_MSG_LENGTH);
struct bmp_data_node *data, *data_next;
WALK_LIST_DELSAFE(data, data_next, p->update_msg_queue)
{
bmp_put_data(&update_msgs, data->data, data->data_size);
bmp_route_monitor_msg_serialize(&payload,
data->global_peer, true /* TODO: Hardcoded pre-policy Adj-Rib-In */,
data->remote_as, data->remote_id, true,
data->remote_ip, bmp_buffer_data(&update_msgs), bmp_buffer_pos(&update_msgs),
data->remote_ip, data->data, data->data_size,
data->timestamp);
bmp_schedule_tx_packet(p, bmp_buffer_data(&payload), bmp_buffer_pos(&payload));
bmp_buffer_flush(&payload);
bmp_buffer_flush(&update_msgs);
mb_free(data->data);
rem_node(&data->n);
@ -678,7 +673,6 @@ bmp_route_monitor_commit(void *p_)
}
bmp_buffer_free(&payload);
bmp_buffer_free(&update_msgs);
}
static void