From f0cb3317a0cf8333c03b0a45e3bb25c7490f85ef Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 10 Mar 2011 10:25:12 +0100 Subject: Add IPE infrastructure and make sure that cameras check grabber existence --- src/uca.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/uca.c') diff --git a/src/uca.c b/src/uca.c index 3e016d1..58125b3 100644 --- a/src/uca.c +++ b/src/uca.c @@ -114,12 +114,14 @@ struct uca_t *uca_init(void) i++; } - if (grabber == NULL) { - free(uca); - return NULL; - } + /* XXX: We could have no grabber (aka NULL) which is good anyway, since + * some cameras don't need a grabber device (such as the IPE camera), + * therefore we also probe each camera against the NULL grabber. However, + * each camera must make sure to check for such a situation. */ + uca->grabbers = grabber; - grabber->next = NULL; + if (grabber != NULL) + grabber->next = NULL; /* Probe each camera that is configured */ i = 0; -- cgit v1.2.3