summaryrefslogtreecommitdiffstats
path: root/src/cameras
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-07-27 14:55:15 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-07-27 14:55:15 +0200
commitacc8d39288bdd4c27308d748b5af1b52949bfd0b (patch)
tree88957b81bff1950e42189a354601067757d78dde /src/cameras
parent78850db6a9c48364748021ec54973cdfe2a7cfb4 (diff)
downloadlibuca-acc8d39288bdd4c27308d748b5af1b52949bfd0b.tar.gz
libuca-acc8d39288bdd4c27308d748b5af1b52949bfd0b.tar.bz2
libuca-acc8d39288bdd4c27308d748b5af1b52949bfd0b.tar.xz
libuca-acc8d39288bdd4c27308d748b5af1b52949bfd0b.zip
Output errors from pcilib
Diffstat (limited to 'src/cameras')
-rw-r--r--src/cameras/uca-ufo-camera.c12
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);