- fixed some issues broken when the new task system was introduced

This commit is contained in:
zolliker
2013-06-07 06:39:50 +00:00
parent db963166df
commit 906ceb96e8
2 changed files with 10 additions and 7 deletions

View File

@ -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;