From ff7f2398283f5059e3b8e0149e0582ee7d30ad21 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 23 Mar 2011 12:35:19 +0100 Subject: Use more flexible error codes --- src/uca.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/uca.c') 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) -- cgit v1.2.3