[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/05: add basic cmdline checking
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/05: add basic cmdline checking |
Date: |
Thu, 12 Jan 2017 18:13:33 +0100 |
This is an automated email from the git hooks/post-receive script.
mteich pushed a commit to branch master
in repository gnunet.
commit 220d336ce3bcb6444b090914a7ee72a32c915414
Author: Markus Teich <address@hidden>
AuthorDate: Thu Jan 12 17:28:41 2017 +0100
add basic cmdline checking
---
src/auction/gnunet-auction-create.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/src/auction/gnunet-auction-create.c
b/src/auction/gnunet-auction-create.c
index 13c84f49a..fae9c13ae 100644
--- a/src/auction/gnunet-auction-create.c
+++ b/src/auction/gnunet-auction-create.c
@@ -55,7 +55,35 @@ run (void *cls,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- /* main code here */
+ /* cmdline parsing */
+ if (GNUNET_TIME_UNIT_ZERO.rel_value_us == dstart.rel_value_us)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "required argument --regtime missing or invalid
(zero)\n");
+ goto fail;
+ }
+ if (GNUNET_TIME_UNIT_ZERO.rel_value_us == dround.rel_value_us)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "required argument --roundtime missing or invalid
(zero)\n");
+ goto fail;
+ }
+ if (!fndesc)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "required argument --description missing\n");
+ goto fail;
+ }
+ if (!fnprices)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "required argument --pricemap missing\n");
+ goto fail;
+ }
+
+fail:
+ ret = 1;
+ return;
}
--
To stop receiving notification emails like this one, please contact
address@hidden