diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-03-23 12:35:19 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-03-23 12:35:19 +0100 |
commit | ff7f2398283f5059e3b8e0149e0582ee7d30ad21 (patch) | |
tree | 598637736b0c8164dabad2c163b01816279f0051 /src/uca.c | |
parent | 6c822e1dedff95eeb64733e8ae0f7554b01bcd17 (diff) | |
download | libuca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.gz libuca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.bz2 libuca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.xz libuca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.zip |
Use more flexible error codes
Diffstat (limited to 'src/uca.c')
-rw-r--r-- | src/uca.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |