aboutsummaryrefslogtreecommitdiff
path: root/src/util/gnunet-qr.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2020-09-08 13:35:15 +0200
committert3sserakt <t3ss@posteo.de>2020-09-08 13:35:15 +0200
commita7d0275e63ddd9780c5a44caeee3646d3af1a396 (patch)
tree054ea845a0807dc5e1f096052210cb8943384c10 /src/util/gnunet-qr.c
parent9e012a7a5c3991d224018b2d390b09d8e32c57ae (diff)
parentab142f088793e5fcf926eb1a352793df49f80c34 (diff)
downloadgnunet-a7d0275e63ddd9780c5a44caeee3646d3af1a396.tar.gz
gnunet-a7d0275e63ddd9780c5a44caeee3646d3af1a396.zip
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/util/gnunet-qr.c')
-rw-r--r--src/util/gnunet-qr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/gnunet-qr.c b/src/util/gnunet-qr.c
index 83b2af2fc..451d61d40 100644
--- a/src/util/gnunet-qr.c
+++ b/src/util/gnunet-qr.c
@@ -36,7 +36,7 @@
36/** 36/**
37 * Video device to capture from. Sane default for GNU/Linux systems. 37 * Video device to capture from. Sane default for GNU/Linux systems.
38 */ 38 */
39static char *device = "/dev/video0"; 39static char *device;
40 40
41/** 41/**
42 * --verbose option 42 * --verbose option
@@ -51,7 +51,7 @@ static int silent = false;
51/** 51/**
52 * Handler exit code 52 * Handler exit code
53 */ 53 */
54static long unsigned int exit_code = 1; 54static long unsigned int exit_code = 0;
55 55
56/** 56/**
57 * Helper process we started. 57 * Helper process we started.
@@ -228,6 +228,8 @@ get_symbol (zbar_processor_t *proc)
228 } 228 }
229 229
230 /* initialize the Processor */ 230 /* initialize the Processor */
231 if (NULL == device)
232 device = GNUNET_strdup ("/dev/video0");
231 if (0 != (rc = zbar_processor_init (proc, device, 1))) 233 if (0 != (rc = zbar_processor_init (proc, device, 1)))
232 { 234 {
233 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 235 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -306,6 +308,7 @@ run_zbar ()
306 ret = GNUNET_strdup (data); 308 ret = GNUNET_strdup (data);
307 /* clean up */ 309 /* clean up */
308 zbar_processor_destroy (proc); 310 zbar_processor_destroy (proc);
311 GNUNET_free (device);
309 return ret; 312 return ret;
310} 313}
311 314