[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 04/30: gnunet-qr: Actually run gnunet-uri.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 04/30: gnunet-qr: Actually run gnunet-uri. |
Date: |
Wed, 03 Apr 2019 13:53:45 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit e8e2d599bca5e88fa210c61676d8370fc112c66a
Author: Hartmut Goebel <address@hidden>
AuthorDate: Sat Mar 2 17:27:36 2019 +0100
gnunet-qr: Actually run gnunet-uri.
---
src/util/gnunet-qr.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/util/gnunet-qr.c b/src/util/gnunet-qr.c
index b375d20a7..c8919dae4 100644
--- a/src/util/gnunet-qr.c
+++ b/src/util/gnunet-qr.c
@@ -22,6 +22,7 @@
#include <zbar.h>
#include <stdbool.h>
#include <getopt.h>
+#include "gnunet-qr-utils.h"
static const char *usage_note =
"gnunet-qr\n"
@@ -128,16 +129,16 @@ int main (int argc, char **argv)
LOG("Found %s \"%s\"\n",
zbar_get_symbol_name(zbar_symbol_get_type(symbol)), data);
- /* TODO
- args = ["gnunet-uri",
- // FIXME: "-c", configuration,
- data];
- if (verbose = true) {
- // TODO: print arguments:
- printf("Running `%s %s %s %s`", *args, "", ""); // FIXME variable num
args
+ if (configuration == NULL) {
+ char* command_args[] = {"gnunet-uri", data, NULL };
+ LOG("Running `gnunet-uri %s`\n", data);
+ rc = fork_and_exec("gnunet-uri", command_args);
+ } else {
+ char* command_args[] = {"gnunet-uri", "-c", configuration, data, NULL };
+ LOG("Running `gnunet-uri -c '%s' %s`\n", configuration, data);
+ rc = fork_and_exec("gnunet-uri", command_args);
};
- rc = popen("gnunet-uri", *args);
- */
+
if (rc != 0) {
printf("Failed to add URI %s\n", data);
} else {
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (65c86ea8d -> f256a930e), gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 04/30: gnunet-qr: Actually run gnunet-uri.,
gnunet <=
- [GNUnet-SVN] [gnunet] 06/30: configure.ac: Add check for libzbar (using pkgconfig)., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 02/30: gnunet-qr: Simplify verbose messaging., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 05/30: Add Hartmut Goebel to the AUTHORS file., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 10/30: gnunet-qr: Use GNUNET_PROGRAM_run to simplify the code., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 03/30: Add helper lib "gnunet-qr-utils.h"., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 07/30: gnunet-qr: Add into Makefile.am and pofiles,, gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 01/30: gnunet-qr: Reimplement in C - yet only a proof of concept., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 25/30: contrib/guix: Add zbar as dependency for package gnunet., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 17/30: gnunet-qr: Actually run gnunet-uri., gnunet, 2019/04/03
- [GNUnet-SVN] [gnunet] 15/30: gnunet-qr: Simplify verbose messaging., gnunet, 2019/04/03