Fix Solaris SEGV bug: null pointer passed to sprintf()

This commit is contained in:
Andrew Bettison 2013-03-06 12:56:41 +10:30
parent 25e5acc68c
commit 157fe3f1d6

View File

@ -748,12 +748,12 @@ rhizome_fetch(struct rhizome_fetch_slot *slot, rhizome_manifest *m, const struct
m->dataFileName = NULL;
m->dataFileUnlinkOnFree = 0;
slot->manifest = m;
if (schedule_fetch(slot) == -1) {
if (schedule_fetch(slot) == -1)
return -1;
}
if (config.debug.rhizome_rx)
DEBUGF(" started fetch bid %s version 0x%llx into %s, slot=%d filehash=%s",
alloca_tohex_bid(slot->bid), slot->bidVersion, slot->manifest->dataFileName, slotno(slot), m->fileHexHash);
if (config.debug.rhizome_rx)
DEBUGF(" started fetch bid %s version 0x%llx into %s, slot=%d filehash=%s",
alloca_tohex_bid(slot->bid), (long long) slot->bidVersion,
alloca_str_toprint(slot->manifest->dataFileName), slotno(slot), m->fileHexHash);
return STARTED;
}