Add UPnP detection results to the Crash dump.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8557 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
25b9dc9ba6
commit
e8d4d378a8
|
@ -26,7 +26,7 @@
|
|||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/string_ext.h"
|
||||
#include "lib/gamelib/gtime.h"
|
||||
#include "src/component.h"
|
||||
#include "src/component.h" // FIXME: we need to handle this better
|
||||
#include <time.h> // for stats
|
||||
#include <SDL_timer.h>
|
||||
#include <physfs.h>
|
||||
|
@ -38,6 +38,7 @@
|
|||
#include "miniupnpc/miniwget.h"
|
||||
#include "miniupnpc/miniupnpc.h"
|
||||
#include "miniupnpc/upnpcommands.h"
|
||||
#include "lib/exceptionhandler/dumpinfo.h"
|
||||
|
||||
#if defined(WZ_OS_UNIX)
|
||||
# include <arpa/inet.h>
|
||||
|
@ -1820,6 +1821,7 @@ static int upnp_init(void *asdf)
|
|||
struct UPNPDev *dev;
|
||||
char *descXML;
|
||||
int descXMLsize = 0;
|
||||
char buf[255];
|
||||
|
||||
memset(&urls, 0, sizeof(struct UPNPUrls));
|
||||
memset(&data, 0, sizeof(struct IGDdatas));
|
||||
|
@ -1855,10 +1857,16 @@ static int upnp_init(void *asdf)
|
|||
|
||||
if (!urls.controlURL || urls.controlURL[0] == '\0')
|
||||
{
|
||||
ssprintf(buf, "UPnP device found: %s %s LAN address %s, but failed controlURL", dev->descURL, dev->st, lanaddr);
|
||||
addDumpInfo(buf);
|
||||
return false;
|
||||
}
|
||||
ssprintf(buf, "UPnP device found: %s %s LAN address %s", dev->descURL, dev->st, lanaddr);
|
||||
addDumpInfo(buf);
|
||||
return true;
|
||||
}
|
||||
ssprintf(buf, "UPnP device not found.");
|
||||
addDumpInfo(buf);
|
||||
debug(LOG_NET, "No UPnP devices found.");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue