From ce75b486f413f74345d44ba0960a262544dd4e00 Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 12 Nov 2010 15:21:49 +0000 Subject: [PATCH] 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 --- libretroshare/src/ft/ftserver.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 44de9a640..5145a0d38 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -1016,15 +1016,17 @@ bool ftServer::handleCacheData() /* these go to the CacheStrapper! */ CacheData data; + 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.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.recvd = time(NULL) ; + mCacheStrapper->recvCacheResponse(data, time(NULL)); delete ci;