From: Wilfried Goesgens Date: Tue, 18 Oct 2011 19:30:10 +0000 (+0200) Subject: Just try to delete the Pos, if we realy found the entry. X-Git-Tag: v8.11~411 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=597503be136bf68b8370870021a6bd8b68ec31db Just try to delete the Pos, if we realy found the entry. --- diff --git a/citadel/file_ops.c b/citadel/file_ops.c index 9040c4c74..69e49c45e 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -70,9 +70,8 @@ int network_talking_to(const char *nodename, long len, int operation) { (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);