(GetCount(nttlist) == 0))
break;
Pos = GetNewHashPos(nttlist, 1);
- GetHashPosFromKey (nttlist, nodename, len, Pos);
-
- DeleteEntryFromHash(nttlist, Pos);
+ if (GetHashPosFromKey (nttlist, nodename, len, Pos))
+ DeleteEntryFromHash(nttlist, Pos);
DeleteHashPos(&Pos);
syslog(LOG_DEBUG, "nttlist: removed <%s>\n", nodename);
if ((nttlist == NULL) ||
(GetCount(nttlist) == 0))
break;
- if (!GetHash(nttlist, nodename, len, &vdata))
+ if (GetHash(nttlist, nodename, len, &vdata))
retval ++;
syslog(LOG_DEBUG, "nttlist: have [%d] <%s>\n", retval, nodename);
break;
char buf[PATH_MAX];
int a;
struct ctdlroom qrbuf;
- int rv = 0;
extract_token(filename, cmdbuf, 0, '|', sizeof filename);
extract_token(newroom, cmdbuf, 1, '|', sizeof newroom);
snprintf(buf, sizeof buf,
"cat ./files/%s/filedir |grep \"%s\" >>./files/%s/filedir",
CC->room.QRdirname, filename, qrbuf.QRdirname);
- rv = system(buf);
+ system(buf);
cprintf("%d File '%s' has been moved.\n", CIT_OK, filename);
}
}
if (bytes > 100000) {
- cprintf("%d You may not write more than 100000 bytes.\n",
- ERROR + TOO_BIG);
- return;
+ bytes = 100000;
}
cprintf("%d %d\n", SEND_BINARY, bytes);