From 44600c31c8ffd5a0a54a3ff2eecef3d2420234f6 Mon Sep 17 00:00:00 2001 From: Andrew Whitwham Date: Mon, 11 Jan 2016 16:43:59 +0000 Subject: [PATCH] Changed iRODS identifier to include version. --- tears.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tears.c b/tears.c index 0746bc3..12ef60a 100644 --- a/tears.c +++ b/tears.c @@ -202,7 +202,7 @@ int main (int argc, char **argv) { int status; char *obj_name = NULL; char *buffer; - char *prog_name; + char prog_name[10]; size_t buf_size = DEFAULT_BUFFER_SIZE; int verbose = 0; int opt; @@ -255,14 +255,8 @@ int main (int argc, char **argv) { } // set the client name so iRODS knows what program is connecting to it - prog_name = strrchr(argv[0], '/'); - - if (!prog_name) { - prog_name = argv[0]; - } else { - prog_name++; // don't want the actual '/' - } - + sprintf(prog_name, "%s:%s", PACKAGE_NAME, PACKAGE_VERSION); + if (verbose) { fprintf(stderr, "Setting client name to: %s\n", prog_name); }