From 34e3e908daf5ef3b7147f28b8de0b75a10f6e808 Mon Sep 17 00:00:00 2001 From: Gerard Wagener Date: Mon, 11 Feb 2019 14:36:53 +0100 Subject: [PATCH] chg: [pibs] check redis parameters --- bin/pibs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/pibs.c b/bin/pibs.c index baec272..b4c6c7e 100644 --- a/bin/pibs.c +++ b/bin/pibs.c @@ -476,7 +476,10 @@ int main(int argc, char* argv[]) } if (pibs->uuid[0]) { snprintf(pibs->key, SZKEY, "analyzer:1:%s",pibs->uuid); - printf("key: %s\n", pibs->key); + if ((pibs->server[0] == 0) || (pibs->port == 0)) { + fprintf(stderr,"Redis parameter server and port are incomplete. Use -z and -p options.\n"); + return EXIT_FAILURE; + } } if (pibs->filename[0]) { process_file(pibs);