From b34fd7432d61b992446a3cd9c6f8eb7747ba0a76 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Wed, 14 Mar 2012 19:34:35 +0100 Subject: Use the spice-common logging functions It will abort by default for critical level messages. That behaviour can be tuned at runtime. --- server/agent-msg-filter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/agent-msg-filter.c') diff --git a/server/agent-msg-filter.c b/server/agent-msg-filter.c index 71ff49b7..7584b52f 100644 --- a/server/agent-msg-filter.c +++ b/server/agent-msg-filter.c @@ -39,7 +39,7 @@ int agent_msg_filter_process_data(struct AgentMsgFilter *filter, struct VDAgentMessage msg_header; if (len > VD_AGENT_MAX_DATA_SIZE) { - red_printf("invalid agent message: too large"); + spice_printerr("invalid agent message: too large"); return AGENT_MSG_FILTER_PROTO_ERROR; } @@ -47,7 +47,7 @@ int agent_msg_filter_process_data(struct AgentMsgFilter *filter, if (filter->msg_data_to_read) { data_to_read: if (len > filter->msg_data_to_read) { - red_printf("invalid agent message: data exceeds size from header"); + spice_printerr("invalid agent message: data exceeds size from header"); return AGENT_MSG_FILTER_PROTO_ERROR; } filter->msg_data_to_read -= len; @@ -55,14 +55,14 @@ data_to_read: } if (len < sizeof(msg_header)) { - red_printf("invalid agent message: incomplete header"); + spice_printerr("invalid agent message: incomplete header"); return AGENT_MSG_FILTER_PROTO_ERROR; } memcpy(&msg_header, data, sizeof(msg_header)); len -= sizeof(msg_header); if (msg_header.protocol != VD_AGENT_PROTOCOL) { - red_printf("invalid agent protocol: %u", msg_header.protocol); + spice_printerr("invalid agent protocol: %u", msg_header.protocol); return AGENT_MSG_FILTER_PROTO_ERROR; } -- cgit