mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fix windows compile
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2035 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a51df4ba6b
commit
0291c94702
@ -442,7 +442,7 @@ bool RsDiscSerialiser::serialiseReply(RsDiscReply *item, void *data, uint32_
|
|||||||
uint32_t size = 16000;
|
uint32_t size = 16000;
|
||||||
RsPeerNetItem pitem = *pitemIt;
|
RsPeerNetItem pitem = *pitemIt;
|
||||||
ok &= rss->serialise(&pitem, pitemData, &size);
|
ok &= rss->serialise(&pitem, pitemData, &size);
|
||||||
memcpy(data + offset, pitemData, size);
|
memcpy((void *) (((char *) data) + offset), pitemData, size);
|
||||||
free(pitemData);
|
free(pitemData);
|
||||||
offset += size;
|
offset += size;
|
||||||
}
|
}
|
||||||
@ -506,7 +506,7 @@ RsDiscReply *RsDiscSerialiser::deserialiseReply(void *data, uint32_t *pktsize)
|
|||||||
while (offset < rssize) {
|
while (offset < rssize) {
|
||||||
void *peerNetdata = malloc(16000);
|
void *peerNetdata = malloc(16000);
|
||||||
uint32_t peerNetSize = (*pktsize) - offset;
|
uint32_t peerNetSize = (*pktsize) - offset;
|
||||||
memcpy(peerNetdata, data + offset, peerNetSize);
|
memcpy(peerNetdata, (void *) (((char *) data) + offset), peerNetSize);
|
||||||
RsPeerNetItem *rsPeerNetItem = (RsPeerNetItem*)rss->deserialise(peerNetdata, &peerNetSize);
|
RsPeerNetItem *rsPeerNetItem = (RsPeerNetItem*)rss->deserialise(peerNetdata, &peerNetSize);
|
||||||
offset += peerNetSize;
|
offset += peerNetSize;
|
||||||
item->rsPeerList.push_back(*rsPeerNetItem);
|
item->rsPeerList.push_back(*rsPeerNetItem);
|
||||||
|
Loading…
Reference in New Issue
Block a user