- fixed some issues broken when the new task system was introduced
This commit is contained in:
14
syncedprot.c
14
syncedprot.c
@ -385,13 +385,15 @@ static void SyncedKillPrivate(void *private) {
|
|||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
static int SyncedProtInit(Ascon * a, SConnection * con, int argc, char *argv[])
|
static int SyncedProtInit(Ascon * a, SConnection * con, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc == 2) {
|
a->timeout = 0.0;
|
||||||
a->timeout = atof(argv[1]);
|
if (argc > 1) {
|
||||||
} else if (argc > 2) {
|
/* a dummy hostport is used, here a unique name should be given */
|
||||||
/* a dummy hostport is used */
|
a->hostport = strdup(argv[1]);
|
||||||
a->timeout = atof(argv[2]);
|
if (argc > 2) {
|
||||||
|
a->timeout = atof(argv[2]);
|
||||||
|
}
|
||||||
} else {
|
} 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->private = calloc(1, sizeof(long));
|
||||||
a->killPrivate = SyncedKillPrivate;
|
a->killPrivate = SyncedKillPrivate;
|
||||||
|
@ -55,4 +55,5 @@ long SyncedGet(void);
|
|||||||
*/
|
*/
|
||||||
int SyncedPending(long syncid);
|
int SyncedPending(long syncid);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user