From: Aleš Křenek Date: Tue, 5 Aug 2008 12:08:50 +0000 (+0000) Subject: fix the -t semantics also for other commands (not only new) X-Git-Tag: merge_316_6_after~11 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d5ab611b0b465e64ea5d481c1ae9ee0299a643c5;p=jra1mw.git fix the -t semantics also for other commands (not only new) --- diff --git a/org.glite.lb.client/src/notify.c b/org.glite.lb.client/src/notify.c index ffbb3bf..b6a227e 100644 --- a/org.glite.lb.client/src/notify.c +++ b/org.glite.lb.client/src/notify.c @@ -185,7 +185,7 @@ int main(int argc,char **argv) if (sock >= 0) { usage("bind"); return EX_USAGE; } fake_addr = optarg; break; case 't': - valid = atol(optarg); break; + valid = time(NULL) + atol(optarg); break; default: usage("bind"); return EX_USAGE; } @@ -219,7 +219,7 @@ int main(int argc,char **argv) case 'f': field_arg = optarg; break; case 't': - valid = atol(optarg); break; + valid = time(NULL) + atol(optarg); break; default: usage("receive"); return EX_USAGE; } @@ -340,7 +340,7 @@ receive_err: while ((c = getopt(argc-1,argv+1,"t:")) > 0) switch (c) { case 't': - valid = atol(optarg); break; + valid = time(NULL) + atol(optarg); break; default: usage("refresh"); return EX_USAGE; }