mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
net: add debug logs
Helped to debug next patch use-after-free. Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6c3ef66cc6
commit
54e59e9135
@ -318,8 +318,8 @@ daemonStreamFilter(virNetServerClient *client,
|
||||
msg->header.serial != stream->serial)
|
||||
goto cleanup;
|
||||
|
||||
VIR_DEBUG("Incoming client=%p, rx=%p, serial=%u, proc=%d, status=%d",
|
||||
client, stream->rx, msg->header.proc,
|
||||
VIR_DEBUG("Incoming client=%p, rx=%p, msg=%p, serial=%u, proc=%d, status=%d",
|
||||
client, stream->rx, msg, msg->header.proc,
|
||||
msg->header.serial, msg->header.status);
|
||||
|
||||
virNetMessageQueuePush(&stream->rx, msg);
|
||||
|
@ -103,6 +103,8 @@ void virNetMessageQueuePush(virNetMessage **queue, virNetMessage *msg)
|
||||
{
|
||||
virNetMessage *tmp = *queue;
|
||||
|
||||
VIR_DEBUG("queue=%p msg=%p", queue, msg);
|
||||
|
||||
if (tmp) {
|
||||
while (tmp->next)
|
||||
tmp = tmp->next;
|
||||
@ -117,10 +119,13 @@ virNetMessage *virNetMessageQueueServe(virNetMessage **queue)
|
||||
{
|
||||
virNetMessage *tmp = *queue;
|
||||
|
||||
VIR_DEBUG("queue serve start queue=%p *queue=%p", queue, *queue);
|
||||
|
||||
if (tmp) {
|
||||
*queue = g_steal_pointer(&tmp->next);
|
||||
}
|
||||
|
||||
VIR_DEBUG("queue serve end queue=%p *queue=%p", queue, *queue);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user