summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-10-23 09:41:31 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-10-23 09:41:31 +0200
commite88005e679e7d5bd713c6dc38de80b7a75798010 (patch)
tree1acc899c6046c106ac42e433ba30b7fe16502f4b
parent0b9bdb34cce03b09fa2392c03f4131fc439a3c41 (diff)
downloaduca-e88005e679e7d5bd713c6dc38de80b7a75798010.tar.gz
uca-e88005e679e7d5bd713c6dc38de80b7a75798010.tar.bz2
uca-e88005e679e7d5bd713c6dc38de80b7a75798010.tar.xz
uca-e88005e679e7d5bd713c6dc38de80b7a75798010.zip
Output location of pcilib errors
-rw-r--r--plugins/ufo/uca-ufo-camera.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ufo/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c
index 2b289a5..c4e05b0 100644
--- a/plugins/ufo/uca-ufo-camera.c
+++ b/plugins/ufo/uca-ufo-camera.c
@@ -28,7 +28,8 @@
if (err != 0) { \
g_set_error(error, UCA_UFO_CAMERA_ERROR, \
err_type, \
- "pcilib: %s", strerror(err)); \
+ "%s:%i pcilib: %s (errcode = %d)", \
+ __FILE__, __LINE__, strerror(err), err);\
return; \
}
@@ -280,7 +281,7 @@ static void uca_ufo_camera_grab(UcaCamera *camera, gpointer *data, GError **erro
UcaUfoCameraPrivate *priv = UCA_UFO_CAMERA_GET_PRIVATE(camera);
pcilib_event_id_t event_id;
pcilib_event_info_t event_info;
- size_t err;
+ int err;
const gsize size = SENSOR_WIDTH * SENSOR_HEIGHT * sizeof(guint16);
@@ -295,7 +296,7 @@ static void uca_ufo_camera_grab(UcaCamera *camera, gpointer *data, GError **erro
if (*data == NULL)
*data = g_malloc0(SENSOR_WIDTH * SENSOR_HEIGHT * sizeof(guint16));
- gpointer src = pcilib_get_data(priv->handle, event_id, PCILIB_EVENT_DATA, &err);
+ gpointer src = pcilib_get_data(priv->handle, event_id, PCILIB_EVENT_DATA, (size_t *) &err);
if (src == NULL)
PCILIB_SET_ERROR(err, UCA_UFO_CAMERA_ERROR_NO_DATA);