From a6dfac2a3770dbcf0c5d4cd9161a1f40cfa9f588 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Thu, 19 Apr 2012 22:10:00 +0000 Subject: [PATCH] Removed std::stringstream. Removed not necessary include . git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5112 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libbitdht/src/bitdht/bdaccount.cc | 1 - libbitdht/src/bitdht/bdpeer.cc | 1 - libbitdht/src/bitdht/bdquerymgr.cc | 1 - libbitdht/src/bitdht/bdstddht.cc | 1 - libbitdht/src/tests/bdbloom_makefilter.cc | 1 - libbitdht/src/tests/bdbloom_test.cc | 1 - libbitdht/src/udp/udpbitdht.cc | 1 - libbitdht/src/udp/udpstack.cc | 1 - libretroshare/src/dbase/cachestrapper.cc | 1 - libretroshare/src/dht/p3bitdht_interface.cc | 1 - libretroshare/src/dht/p3bitdht_peernet.cc | 1 - libretroshare/src/ft/ftserver.cc | 1 - libretroshare/src/pqi/authgpg.cc | 1 - libretroshare/src/pqi/pqissludp.cc | 1 - libretroshare/src/pqi/sslfns.cc | 24 +++++++++----------- libretroshare/src/rsserver/p3discovery.cc | 1 - libretroshare/src/rsserver/p3face-config.cc | 1 - libretroshare/src/rsserver/p3face-msgs.cc | 1 - libretroshare/src/rsserver/p3msgs.cc | 1 - libretroshare/src/rsserver/rsinit.cc | 1 - libretroshare/src/rsserver/rstypes.cc | 1 - libretroshare/src/serialiser/rstlvaddrs.cc | 1 - libretroshare/src/serialiser/rstlvbanlist.cc | 1 - libretroshare/src/serialiser/rstlvdsdv.cc | 1 - libretroshare/src/serialiser/rstlvkeys.cc | 1 - libretroshare/src/serialiser/rstlvkvwide.cc | 1 - libretroshare/src/services/p3disc.cc | 2 -- libretroshare/src/services/p3gamelauncher.cc | 1 - libretroshare/src/turtle/p3turtle.cc | 2 +- libretroshare/src/upnp/upnphandler.cc | 1 - libretroshare/src/util/dnsresolver.cc | 1 - libretroshare/src/util/rsdir.cc | 1 - libretroshare/src/zeroconf/p3zcnatassist.cc | 1 - 33 files changed, 12 insertions(+), 46 deletions(-) diff --git a/libbitdht/src/bitdht/bdaccount.cc b/libbitdht/src/bitdht/bdaccount.cc index bf955b930..6246b0241 100644 --- a/libbitdht/src/bitdht/bdaccount.cc +++ b/libbitdht/src/bitdht/bdaccount.cc @@ -30,7 +30,6 @@ #include #include -#include #define LPF_FACTOR (0.90) diff --git a/libbitdht/src/bitdht/bdpeer.cc b/libbitdht/src/bitdht/bdpeer.cc index d5c4eeaa8..d042d03e2 100644 --- a/libbitdht/src/bitdht/bdpeer.cc +++ b/libbitdht/src/bitdht/bdpeer.cc @@ -35,7 +35,6 @@ #include #include -#include #include /** diff --git a/libbitdht/src/bitdht/bdquerymgr.cc b/libbitdht/src/bitdht/bdquerymgr.cc index d766d62fd..e09512fbb 100644 --- a/libbitdht/src/bitdht/bdquerymgr.cc +++ b/libbitdht/src/bitdht/bdquerymgr.cc @@ -33,7 +33,6 @@ #include #include -#include #define BITDHT_QUERY_START_PEERS 10 diff --git a/libbitdht/src/bitdht/bdstddht.cc b/libbitdht/src/bitdht/bdstddht.cc index 465c50046..3faa85df2 100644 --- a/libbitdht/src/bitdht/bdstddht.cc +++ b/libbitdht/src/bitdht/bdstddht.cc @@ -35,7 +35,6 @@ #include #include -#include #include /** diff --git a/libbitdht/src/tests/bdbloom_makefilter.cc b/libbitdht/src/tests/bdbloom_makefilter.cc index ceb95c7c3..022db879d 100644 --- a/libbitdht/src/tests/bdbloom_makefilter.cc +++ b/libbitdht/src/tests/bdbloom_makefilter.cc @@ -27,7 +27,6 @@ #include "util/bdbloom.h" #include "bitdht/bdstddht.h" #include -#include #define N_TESTS 100 diff --git a/libbitdht/src/tests/bdbloom_test.cc b/libbitdht/src/tests/bdbloom_test.cc index aacb70395..177ad4d4c 100644 --- a/libbitdht/src/tests/bdbloom_test.cc +++ b/libbitdht/src/tests/bdbloom_test.cc @@ -27,7 +27,6 @@ #include "util/bdbloom.h" #include "bitdht/bdstddht.h" #include -#include #define N_TESTS 100 diff --git a/libbitdht/src/udp/udpbitdht.cc b/libbitdht/src/udp/udpbitdht.cc index 7e0d551a8..e6f109c39 100644 --- a/libbitdht/src/udp/udpbitdht.cc +++ b/libbitdht/src/udp/udpbitdht.cc @@ -33,7 +33,6 @@ #include #include /* for usleep() */ #include -#include #include #include diff --git a/libbitdht/src/udp/udpstack.cc b/libbitdht/src/udp/udpstack.cc index c20078398..381fc182d 100644 --- a/libbitdht/src/udp/udpstack.cc +++ b/libbitdht/src/udp/udpstack.cc @@ -26,7 +26,6 @@ #include "udp/udpstack.h" #include -#include #include #include #include diff --git a/libretroshare/src/dbase/cachestrapper.cc b/libretroshare/src/dbase/cachestrapper.cc index a76de18a1..7f2bbffc9 100644 --- a/libretroshare/src/dbase/cachestrapper.cc +++ b/libretroshare/src/dbase/cachestrapper.cc @@ -28,7 +28,6 @@ #include "util/rsdir.h" #include -#include #include /**** diff --git a/libretroshare/src/dht/p3bitdht_interface.cc b/libretroshare/src/dht/p3bitdht_interface.cc index 61a5c996b..5a4928627 100644 --- a/libretroshare/src/dht/p3bitdht_interface.cc +++ b/libretroshare/src/dht/p3bitdht_interface.cc @@ -30,7 +30,6 @@ #include "tcponudp/udpstunner.h" #include "bitdht/bdstddht.h" -#include void convertBdPeerToRsDhtPeer(RsDhtPeer &peer, const bdPeer &int_peer); void convertDhtPeerDetailsToRsDhtNetPeer(RsDhtNetPeer &status, const DhtPeerDetails &details); diff --git a/libretroshare/src/dht/p3bitdht_peernet.cc b/libretroshare/src/dht/p3bitdht_peernet.cc index b3d9fe6bb..f1fd4c945 100644 --- a/libretroshare/src/dht/p3bitdht_peernet.cc +++ b/libretroshare/src/dht/p3bitdht_peernet.cc @@ -3,7 +3,6 @@ #include #include -#include #include "bitdht/bdiface.h" diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index c935f91b1..207fcbb60 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -25,7 +25,6 @@ #include /* for (u)sleep() */ #include -#include #include "util/rsdebug.h" #include "util/rsdir.h" #include "retroshare/rstypes.h" diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index d27780fa7..f2b2206f9 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -36,7 +36,6 @@ #include #include /* for (u)sleep() */ #include -#include #include #include "serialiser/rsconfigitems.h" #include "cleanupxpgp.h" diff --git a/libretroshare/src/pqi/pqissludp.cc b/libretroshare/src/pqi/pqissludp.cc index 02b7ec26c..a7b6ab354 100644 --- a/libretroshare/src/pqi/pqissludp.cc +++ b/libretroshare/src/pqi/pqissludp.cc @@ -32,7 +32,6 @@ #include #include -#include #include "util/rsdebug.h" #include "util/rsnet.h" diff --git a/libretroshare/src/pqi/sslfns.cc b/libretroshare/src/pqi/sslfns.cc index c0d04cc28..00db5f6a2 100644 --- a/libretroshare/src/pqi/sslfns.cc +++ b/libretroshare/src/pqi/sslfns.cc @@ -41,7 +41,6 @@ #include #include -#include #include #include @@ -728,9 +727,9 @@ int LoadCheckX509(const char *cert_file, std::string &issuerName, std::string &l location = getX509LocString(x509->cert_info->subject); } - #ifdef AUTHSSL_DEBUG +#ifdef AUTHSSL_DEBUG std::cout << getX509Info(x509) << std::endl ; - #endif +#endif // clean up. X509_free(x509); @@ -857,21 +856,20 @@ std::string getX509CountryString(X509_NAME *name) } +#ifdef AUTHSSL_DEBUG std::string getX509Info(X509 *cert) { - std::stringstream out; - long l; + std::string out = "X509 Certificate:\n"; - out << "X509 Certificate:" << std::endl; + long l; l=X509_get_version(cert); - out << " Version: " << l+1 << "(0x" << l << ")" << std::endl; - out << " Subject: " << std::endl; - out << " " << getX509NameString(cert->cert_info->subject); - out << std::endl; - out << std::endl; - out << " Signatures:" << std::endl; - return out.str(); + rs_sprintf_append(out, " Version: %ld(0x%ld)\n", l+1, l); + out += " Subject: \n"; + out += " " + getX509NameString(cert->cert_info->subject) + "\n\n"; + out += " Signatures:\n"; + return out; } +#endif /********** SSL ERROR STUFF ******************************************/ diff --git a/libretroshare/src/rsserver/p3discovery.cc b/libretroshare/src/rsserver/p3discovery.cc index bd58e11a5..401595304 100644 --- a/libretroshare/src/rsserver/p3discovery.cc +++ b/libretroshare/src/rsserver/p3discovery.cc @@ -25,7 +25,6 @@ #include "rsserver/p3discovery.h" #include -#include RsDisc *rsDisc = NULL; diff --git a/libretroshare/src/rsserver/p3face-config.cc b/libretroshare/src/rsserver/p3face-config.cc index 37e812250..d21a8a7af 100644 --- a/libretroshare/src/rsserver/p3face-config.cc +++ b/libretroshare/src/rsserver/p3face-config.cc @@ -28,7 +28,6 @@ #include "rsserver/p3face.h" #include -#include #include "pqi/authssl.h" #include "pqi/authgpg.h" #include "retroshare/rsinit.h" diff --git a/libretroshare/src/rsserver/p3face-msgs.cc b/libretroshare/src/rsserver/p3face-msgs.cc index 1df57d990..5b776cd08 100644 --- a/libretroshare/src/rsserver/p3face-msgs.cc +++ b/libretroshare/src/rsserver/p3face-msgs.cc @@ -29,7 +29,6 @@ #include "util/rsdir.h" #include -#include #include "util/rsdebug.h" const int p3facemsgzone = 11453; diff --git a/libretroshare/src/rsserver/p3msgs.cc b/libretroshare/src/rsserver/p3msgs.cc index 3a1ab30fe..23e07b2ca 100644 --- a/libretroshare/src/rsserver/p3msgs.cc +++ b/libretroshare/src/rsserver/p3msgs.cc @@ -27,7 +27,6 @@ #include -#include #include "util/rsdir.h" #include "util/rsdebug.h" diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 9e7ea367f..ee74373ad 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1785,7 +1785,6 @@ RsTurtle *rsTurtle = NULL ; #include #include -#include // for blocking signals #include diff --git a/libretroshare/src/rsserver/rstypes.cc b/libretroshare/src/rsserver/rstypes.cc index dbfcf531c..c5c3c8b02 100644 --- a/libretroshare/src/rsserver/rstypes.cc +++ b/libretroshare/src/rsserver/rstypes.cc @@ -31,7 +31,6 @@ #include "retroshare/rstypes.h" #include -#include #include diff --git a/libretroshare/src/serialiser/rstlvaddrs.cc b/libretroshare/src/serialiser/rstlvaddrs.cc index c3f504e83..6be3b5ec0 100644 --- a/libretroshare/src/serialiser/rstlvaddrs.cc +++ b/libretroshare/src/serialiser/rstlvaddrs.cc @@ -31,7 +31,6 @@ #include "rsbaseserial.h" #include "util/rsprint.h" #include -#include #include #include diff --git a/libretroshare/src/serialiser/rstlvbanlist.cc b/libretroshare/src/serialiser/rstlvbanlist.cc index aa516d9d4..3e3446ad0 100644 --- a/libretroshare/src/serialiser/rstlvbanlist.cc +++ b/libretroshare/src/serialiser/rstlvbanlist.cc @@ -31,7 +31,6 @@ #include "rsbaseserial.h" #include "util/rsprint.h" #include -#include #include #include diff --git a/libretroshare/src/serialiser/rstlvdsdv.cc b/libretroshare/src/serialiser/rstlvdsdv.cc index 8f49ac32f..ecf674d1a 100644 --- a/libretroshare/src/serialiser/rstlvdsdv.cc +++ b/libretroshare/src/serialiser/rstlvdsdv.cc @@ -31,7 +31,6 @@ #include "rsbaseserial.h" #include "util/rsprint.h" #include -#include #include #include diff --git a/libretroshare/src/serialiser/rstlvkeys.cc b/libretroshare/src/serialiser/rstlvkeys.cc index 9ccc20a53..1a6f2663f 100644 --- a/libretroshare/src/serialiser/rstlvkeys.cc +++ b/libretroshare/src/serialiser/rstlvkeys.cc @@ -31,7 +31,6 @@ #include "rsbaseserial.h" #include "util/rsprint.h" #include -#include #include #include diff --git a/libretroshare/src/serialiser/rstlvkvwide.cc b/libretroshare/src/serialiser/rstlvkvwide.cc index 570f3d45b..85d6b2252 100644 --- a/libretroshare/src/serialiser/rstlvkvwide.cc +++ b/libretroshare/src/serialiser/rstlvkvwide.cc @@ -28,7 +28,6 @@ #include "rsbaseserial.h" #include "util/rsprint.h" #include -#include #include #include diff --git a/libretroshare/src/services/p3disc.cc b/libretroshare/src/services/p3disc.cc index 35db40323..9cd316d4b 100644 --- a/libretroshare/src/services/p3disc.cc +++ b/libretroshare/src/services/p3disc.cc @@ -42,8 +42,6 @@ const uint32_t AUTODISC_LDI_SUBTYPE_PING = 0x01; const uint32_t AUTODISC_LDI_SUBTYPE_RPLY = 0x02; -#include - #include "util/rsdebug.h" #include "util/rsprint.h" #include "util/rsversion.h" diff --git a/libretroshare/src/services/p3gamelauncher.cc b/libretroshare/src/services/p3gamelauncher.cc index 2ced58c7b..f2455b5b1 100644 --- a/libretroshare/src/services/p3gamelauncher.cc +++ b/libretroshare/src/services/p3gamelauncher.cc @@ -27,7 +27,6 @@ #include "services/p3gameservice.h" #include "util/rsdebug.h" #include "pqi/p3linkmgr.h" -#include #include /* global variable for GUI */ diff --git a/libretroshare/src/turtle/p3turtle.cc b/libretroshare/src/turtle/p3turtle.cc index f984b4a5d..94d712370 100644 --- a/libretroshare/src/turtle/p3turtle.cc +++ b/libretroshare/src/turtle/p3turtle.cc @@ -50,7 +50,7 @@ #include #include -#include +#include // for std::istringstream #include #include "util/rsdebug.h" diff --git a/libretroshare/src/upnp/upnphandler.cc b/libretroshare/src/upnp/upnphandler.cc index cd2b7316e..d77aa90d1 100644 --- a/libretroshare/src/upnp/upnphandler.cc +++ b/libretroshare/src/upnp/upnphandler.cc @@ -459,7 +459,6 @@ class uPnPConfigData }; #include -#include #include "util/rsnet.h" diff --git a/libretroshare/src/util/dnsresolver.cc b/libretroshare/src/util/dnsresolver.cc index f1bbd0e9f..cd9b312d5 100644 --- a/libretroshare/src/util/dnsresolver.cc +++ b/libretroshare/src/util/dnsresolver.cc @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc index ca9155ada..b58ffb771 100644 --- a/libretroshare/src/util/rsdir.cc +++ b/libretroshare/src/util/rsdir.cc @@ -570,7 +570,6 @@ bool RsDirUtil::hashFile(const std::string& filepath, #include -#include #include /* Function to hash, and get details of a file */ diff --git a/libretroshare/src/zeroconf/p3zcnatassist.cc b/libretroshare/src/zeroconf/p3zcnatassist.cc index 1b43852ff..5bd45048a 100644 --- a/libretroshare/src/zeroconf/p3zcnatassist.cc +++ b/libretroshare/src/zeroconf/p3zcnatassist.cc @@ -28,7 +28,6 @@ #include "zeroconf/p3zcnatassist.h" #include -#include #include //#define DEBUG_ZCNATASSIST 1