mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +00:00
Fix SEGV bugs on Solaris
Revealed by 'rhizomeprotocol' tests FileTransferDelete, DirectPush and DirectSync.
This commit is contained in:
parent
063fe6d467
commit
b4c92a289e
@ -248,7 +248,7 @@ int rhizome_manifest_check_file(rhizome_manifest *m_in)
|
||||
}
|
||||
}
|
||||
if (debug & DEBUG_RHIZOME)
|
||||
DEBUGF("filename=%s, fileLength=%lld", m_in->dataFileName ? alloca_str_toprint(m_in->dataFileName) : NULL, m_in->fileLength);
|
||||
DEBUGF("filename=%s, fileLength=%lld", m_in->dataFileName ? alloca_str_toprint(m_in->dataFileName) : "NULL", m_in->fileLength);
|
||||
if (mfilesize != -1 && mfilesize != m_in->fileLength) {
|
||||
WHYF("Manifest.filesize (%lld) != actual file size (%lld)", mfilesize, m_in->fileLength);
|
||||
return -1;
|
||||
|
@ -971,7 +971,7 @@ void rhizome_direct_http_dispatch(rhizome_direct_sync_request *r)
|
||||
long long rowid = -1;
|
||||
sqlite3_blob *blob=NULL;
|
||||
sqlite_exec_int64(&rowid, "select rowid from files where id='%s';", hash);
|
||||
DEBUGF("Reading from rowid #%d filehash='%s'",rowid,hash?hash:"(null)");
|
||||
DEBUGF("Reading from rowid #%lld filehash='%s'",rowid,hash?hash:"(null)");
|
||||
if (rowid >= 0 && sqlite3_blob_open(rhizome_db, "main", "files", "data",
|
||||
rowid, 0, &blob) != SQLITE_OK)
|
||||
goto closeit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user