summaryrefslogtreecommitdiffstats
path: root/src/uca.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-23 12:35:19 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-23 12:35:19 +0100
commitff7f2398283f5059e3b8e0149e0582ee7d30ad21 (patch)
tree598637736b0c8164dabad2c163b01816279f0051 /src/uca.c
parent6c822e1dedff95eeb64733e8ae0f7554b01bcd17 (diff)
downloaduca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.gz
uca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.bz2
uca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.xz
uca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.zip
Use more flexible error codes
Diffstat (limited to 'src/uca.c')
-rw-r--r--src/uca.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/uca.c b/src/uca.c
index 5b0ad85..aa41417 100644
--- a/src/uca.c
+++ b/src/uca.c
@@ -138,7 +138,7 @@ struct uca *uca_init(const char *config_filename)
while (grabber_inits[i] != NULL) {
uca_grabber_init init = grabber_inits[i];
/* FIXME: we don't only want to take the first one */
- if (init(&grabber) != UCA_ERR_GRABBER_NOT_FOUND)
+ if (init(&grabber) == UCA_NO_ERROR)
break;
i++;
}
@@ -159,7 +159,7 @@ struct uca *uca_init(const char *config_filename)
while (cam_inits[i] != NULL) {
struct uca_camera *cam = NULL;
uca_cam_init init = cam_inits[i];
- if (init(&cam, grabber) != UCA_ERR_CAM_NOT_FOUND) {
+ if (init(&cam, grabber) == UCA_NO_ERROR) {
if (current == NULL)
g_uca->cameras = current = cam;
else {
@@ -214,7 +214,7 @@ enum uca_property_ids uca_get_property_id(const char *property_name)
return i;
i++;
}
- return UCA_ERR_PROP_INVALID;
+ return UCA_ERR_CAMERA | UCA_ERR_PROP | UCA_ERR_INVALID;
}
struct uca_property *uca_get_full_property(enum uca_property_ids property_id)