From 906ceb96e8c6447e3273195f1d5e21a18b4db648 Mon Sep 17 00:00:00 2001 From: zolliker Date: Fri, 7 Jun 2013 06:39:50 +0000 Subject: [PATCH] - fixed some issues broken when the new task system was introduced --- syncedprot.c | 14 ++++++++------ syncedprot.h | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/syncedprot.c b/syncedprot.c index 743882a3..3bafff40 100644 --- a/syncedprot.c +++ b/syncedprot.c @@ -385,13 +385,15 @@ static void SyncedKillPrivate(void *private) { /*----------------------------------------------------------------------------*/ static int SyncedProtInit(Ascon * a, SConnection * con, int argc, char *argv[]) { - if (argc == 2) { - a->timeout = atof(argv[1]); - } else if (argc > 2) { - /* a dummy hostport is used */ - a->timeout = atof(argv[2]); + a->timeout = 0.0; + if (argc > 1) { + /* a dummy hostport is used, here a unique name should be given */ + a->hostport = strdup(argv[1]); + if (argc > 2) { + a->timeout = atof(argv[2]); + } } else { - a->timeout = 0.0; + a->hostport = strdup("synced"); /* WARNING: this name is not unique, but used by Marks new Task manager */ } a->private = calloc(1, sizeof(long)); a->killPrivate = SyncedKillPrivate; diff --git a/syncedprot.h b/syncedprot.h index 7da5ac35..f2097cd6 100644 --- a/syncedprot.h +++ b/syncedprot.h @@ -55,4 +55,5 @@ long SyncedGet(void); */ int SyncedPending(long syncid); -#endif \ No newline at end of file +#endif +