This would be really great, because I am behind a router and have to set the IP for active mode everytime I start DC++ to get it working.
I am no programmer, but I think this could be possible to manage...
hopefully, mooq!
Moderator: Moderators
Sedulus wrote:so hostnames will never get sent...
... this does mean however that you need to restart dc++ whenever your IP changes
Code: Select all
string getLocalIp() {
if(!SETTING(SERVER).empty()) {
return Socket::resolve(SETTING(SERVER));
}
if(socket == NULL)
return Util::getLocalIp();
string tmp = socket->getLocalIp();
if(tmp.empty())
return Util::getLocalIp();
return tmp;
}so at least NT boxes doipconfig /help wrote: /flushdns Purges the DNS Resolver cache.
Code: Select all
jonix Posted: 2003-11-09 17:45 Post subject:
--------------------------------------------------------------------------------
So is this feature included yet?
The status of the request is still "open" and noone is assigned to it.
I tried to put my hostname in the IP field but it didn't seem to be resolved... So i've put together some code to resolve it and edit the IP field at client startup.
You can download it at: http://www.dtek.chalmers.se/~johnk/setdcip
Please let me know if the resolving feature in DC++ is implemented (and works)!
Submitting patches
If you think you've done something that more people could use, you can always submit a patch for inclusion in the
original distribution. I will then consider whether I like the patch or not based on things that might seem to be
completely random, which just might be the case. Popular reasons for rejecting a patch include, but are not limited to,
ugly code, abusable features, feature that I don't like that bloat the applications and incompatibility with other
modifications I've already done.
To increase the chances of your patch being accepted, mail them to me (j_s@telia.com) as diffs against the latest
code you can find (for the moment, it should be the cvs repository on sourceforge, but sometimes I forget to
update it, so check the source code distribution of the latest release as well...). You can find a lot of
information about diff and patch by googling for it.
By submitting a patch, you agree to that I get copyright of it. This to avoid stupid situations later on where
the copyright is split out over a million people, each of which could stop further distribution of DC++. If you don't
like this, start your own distribtution, if you're lucky it might become more popular than the original =).
Code: Select all
------ Build started: Project: DCPlusPlus, Configuration: Debug Win32 ------
Compiling...
GetExternalIp.cpp
Linking...
client.lib(DCPlusPlus.obj) : error LNK2019: unresolved external symbol "private: __thiscall CGetExternalIp::CGetExternalIp(void)" (??0CGetExternalIp@@AAE@XZ) referenced in function "public: static void __cdecl Singleton<class CGetExternalIp>::newInstance(void)" (?newInstance@?$Singleton@VCGetExternalIp@@@@SAXXZ)
client.lib(DCPlusPlus.obj) : error LNK2001: unresolved external symbol "protected: static class CGetExternalIp * Singleton<class CGetExternalIp>::instance" (?instance@?$Singleton@VCGetExternalIp@@@@1PAVCGetExternalIp@@A)
.\App/DCPlusPlus.exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Program Files\DC - sources + include\DC++ source\DCPlusPlus-0.304-src-GetExternalIp_patced\vc7\Debug\windows\\BuildLog.htm"
DCPlusPlus - 3 error(s), 0 warning(s)
Code: Select all
#include "GetExternalIp.h"joakim_tosteberg
Tsm2, have you submitted a patch to arne in the way mentioned in
To get it compile at all I also had to add Code:
#include "GetExternalIp.h"
in dcplusplus.h
Also i think you'll have to redo your code a bit, I can't get it to work in dc++ 0.304.
Users browsing this forum: Google [Bot] and 0 guests