Added missing functions to get retroshare running again.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4420 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-07-10 01:49:39 +00:00
parent bbd11e69c1
commit 59abce2d48
11 changed files with 234 additions and 41 deletions

View file

@ -1,7 +1,30 @@
/* a connect state box */
/*
* libretroshare/src/dht: connectstatebox.cc
*
* RetroShare DHT C++ Interface.
*
* Copyright 2011-2011 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "connectstatebox.h"
#include "netstatebox.h"
#include "dht/connectstatebox.h"
#include "retroshare/rsnetwork.h"
#include <iostream>
#include <sstream>
@ -176,14 +199,14 @@ uint32_t convertNetStateToInternal(uint32_t netmode, uint32_t nattype)
{
uint32_t connNet = CSB_NETSTATE_UNKNOWN;
if (netmode == PNSB_NETWORK_EXTERNALIP)
if (netmode == RSNET_NETWORK_EXTERNALIP)
{
connNet = CSB_NETSTATE_FORWARD;
}
else if (netmode == PNSB_NETWORK_BEHINDNAT)
else if (netmode == RSNET_NETWORK_BEHINDNAT)
{
if ((nattype == PNSB_NATTYPE_RESTRICTED_CONE) ||
(nattype == PNSB_NATTYPE_FULL_CONE))
if ((nattype == RSNET_NATTYPE_RESTRICTED_CONE) ||
(nattype == RSNET_NATTYPE_FULL_CONE))
{
connNet = CSB_NETSTATE_STABLENAT;
}
@ -770,7 +793,7 @@ bool PeerConnectStateBox::getProxyPortChoice()
std::cerr << " UseProxyPort? " << mProxyPortChoice;
std::cerr << std::endl;
return useProxyPort;
return mProxyPortChoice;
}

View file

@ -1,6 +1,31 @@
#ifndef CONNECT_STATUS_BOX_H
#define CONNECT_STATUS_BOX_H
/*
* libretroshare/src/dht: connectstatebox.h
*
* RetroShare DHT C++ Interface.
*
* Copyright 2011-2011 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/* a connect state box */
#define CSB_START 1