diff options
Diffstat (limited to 'src/cameras')
-rw-r--r-- | src/cameras/uca-ufo-camera.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/cameras/uca-ufo-camera.c b/src/cameras/uca-ufo-camera.c index 09704af..66d2f6d 100644 --- a/src/cameras/uca-ufo-camera.c +++ b/src/cameras/uca-ufo-camera.c @@ -98,8 +98,16 @@ struct _UcaUfoCameraPrivate { guint bit_mode; }; -static void ignore_messages(const char *format, ...) +static void +error_handler (const char *format, ...) { + va_list args; + gchar *message; + + va_start (args, format); + message = g_strdup_vprintf (format, args); + g_warning ("%s", message); + va_end (args); } static guint @@ -145,7 +153,7 @@ UcaUfoCamera *uca_ufo_camera_new(GError **error) return NULL; } - pcilib_set_error_handler(&ignore_messages, &ignore_messages); + pcilib_set_error_handler(&error_handler, &error_handler); /* Generate properties from model description */ model_description = pcilib_get_model_description(handle); |