Hi, On Wed, May 24, 2017 at 05:01:39PM +0200, Jakub Janků wrote: > Add prefix "file-xfer #id" prefix to log message in send_file_xfer_status(), > so the message doesn't have to include file-xfer task id and it's always clear, > what task is the message concerning. Makes sense to me Acked-by: Victor Toso <victortoso@xxxxxxxxxx> > --- > src/vdagentd/vdagentd.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c > index d647fab..73b892f 100644 > --- a/src/vdagentd/vdagentd.c > +++ b/src/vdagentd/vdagentd.c > @@ -325,7 +325,7 @@ static void send_file_xfer_status(struct vdagent_virtio_port *vport, > memcpy(status->data, data, data_size); > > if (msg) > - syslog(LOG_WARNING, msg, id); > + syslog(LOG_WARNING, "file-xfer %u: %s", id, msg); > > if (vport) > vdagent_virtio_port_write(vport, VDP_CLIENT_PORT, > @@ -348,14 +348,14 @@ static void do_client_file_xfer(struct vdagent_virtio_port *vport, > if (!active_session_conn) { > send_file_xfer_status(vport, > "Could not find an agent connection belonging to the " > - "active session, cancelling client file-xfer request %u", > + "active session, cancelling file-xfer", > s->id, VD_AGENT_FILE_XFER_STATUS_CANCELLED, NULL, 0); > return; > } else if (session_info_session_is_locked(session_info)) { > syslog(LOG_DEBUG, "Session is locked, skipping file-xfer-start"); > send_file_xfer_status(vport, > "User's session is locked and cannot start file transfer. " > - "Cancelling client file-xfer request %u", > + "Cancelling file-xfer", > s->id, VD_AGENT_FILE_XFER_STATUS_ERROR, NULL, 0); > return; > } > @@ -826,7 +826,7 @@ static gboolean remove_active_xfers(gpointer key, gpointer value, gpointer conn) > { > if (value == conn) { > send_file_xfer_status(virtio_port, > - "Agent disc; cancelling file-xfer %u", > + "Agent disc; cancelling file-xfer", > GPOINTER_TO_UINT(key), > VD_AGENT_FILE_XFER_STATUS_CANCELLED, NULL, 0); > return 1; > @@ -924,7 +924,7 @@ static void agent_read_complete(struct udscs_connection **connp, > /* header->arg1 = file xfer task id, header->arg2 = file xfer status */ > switch (header->arg2) { > case VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE: > - send_file_xfer_status(virtio_port, "Not enough free space. Cancelling file-xfer %u", > + send_file_xfer_status(virtio_port, "Not enough free space. Cancelling file-xfer", > header->arg1, header->arg2, data, sizeof(uint64_t)); > break; > default: > -- > 2.13.0 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/spice-devel
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel