corrected bug due to uninitialized memory read

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3781 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-11-12 15:21:49 +00:00
parent d649a27fd9
commit ce75b486f4

View File

@ -1016,15 +1016,17 @@ bool ftServer::handleCacheData()
/* these go to the CacheStrapper! */
CacheData data;
data.cid = CacheId(ci->cacheType, ci->cacheSubId);
data.hash = ci->file.hash;
data.size = ci->file.filesize;
data.name = ci->file.name;
data.path = ci->file.path;
data.pid = ci->PeerId();
peerConnectState pca;
mConnMgr->getFriendNetStatus(ci->PeerId(), pca);
data.pname = pca.name;
data.cid = CacheId(ci->cacheType, ci->cacheSubId);
data.path = ci->file.path;
data.name = ci->file.name;
data.hash = ci->file.hash;
data.size = ci->file.filesize;
data.recvd = time(NULL) ;
mCacheStrapper->recvCacheResponse(data, time(NULL));
delete ci;