mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
send own ip address list with p3disc
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1902 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4a53fdc0a9
commit
fbec787877
1 changed files with 11 additions and 3 deletions
|
@ -360,7 +360,11 @@ void p3disc::sendOwnDetails(std::string to)
|
||||||
di -> PeerId(to);
|
di -> PeerId(to);
|
||||||
di -> laddr = detail.currentlocaladdr;
|
di -> laddr = detail.currentlocaladdr;
|
||||||
di -> saddr = detail.currentserveraddr;
|
di -> saddr = detail.currentserveraddr;
|
||||||
//di -> ipAddressList = detail.getIpAddressList(); there is no private address list
|
#ifdef P3DISC_DEBUG
|
||||||
|
std::cerr << "p3disc::sendOwnDetails() detail.currentlocaladdr.sin_addr : " << inet_ntoa(detail.currentlocaladdr.sin_addr) << ":" << ntohs(detail.currentlocaladdr.sin_port) << std::endl;
|
||||||
|
std::cerr << "p3disc::sendOwnDetails() detail.currentserveraddr.sin_addr : " << inet_ntoa(detail.currentserveraddr.sin_addr) << ":" << ntohs(detail.currentlocaladdr.sin_port) << std::endl;
|
||||||
|
#endif
|
||||||
|
di -> ipAddressList = detail.getIpAddressList();
|
||||||
di -> contact_tf = 0;
|
di -> contact_tf = 0;
|
||||||
|
|
||||||
/* construct disc flags */
|
/* construct disc flags */
|
||||||
|
@ -390,6 +394,10 @@ void p3disc::sendOwnDetails(std::string to)
|
||||||
|
|
||||||
di->discFlags |= P3DISC_FLAGS_OWN_DETAILS;
|
di->discFlags |= P3DISC_FLAGS_OWN_DETAILS;
|
||||||
|
|
||||||
|
#ifdef P3DISC_DEBUG
|
||||||
|
di->print(std::cerr, 5);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* send msg */
|
/* send msg */
|
||||||
sendItem(di);
|
sendItem(di);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue