ack ----- Mensaje original ----- > libusbredirhost prefixes all its messages with "usbredirhhost ...: ", > which > is useful when logging to stderr, but not so much when showing the > error > to the user in an error dialog, so remove the "usbredirhost error: " > prefix > when we store the message in a GError. > > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> > --- > gtk/channel-usbredir.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c > index 354d2e1..cb2aed3 100644 > --- a/gtk/channel-usbredir.c > +++ b/gtk/channel-usbredir.c > @@ -448,8 +448,13 @@ static void usbredir_log(void *user_data, int > level, const char *msg) > > if (priv->catch_error && level == usbredirparser_error) { > SPICE_DEBUG("%s", msg); > - g_set_error_literal(priv->catch_error, SPICE_CLIENT_ERROR, > - SPICE_CLIENT_ERROR_FAILED, msg); > + /* Remove "usbredirhost..." prefix from usbredirhost error > messages */ > + if (strncmp(msg, "usbredirhost error: ", 20) == 0) > + g_set_error_literal(priv->catch_error, > SPICE_CLIENT_ERROR, > + SPICE_CLIENT_ERROR_FAILED, msg + > 20); > + else > + g_set_error_literal(priv->catch_error, > SPICE_CLIENT_ERROR, > + SPICE_CLIENT_ERROR_FAILED, msg); > return; > } > > -- > 1.7.10.4 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/spice-devel > _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel