Browse Source

Make a deep copy of our addresses for UPnP

Somehow "Expression: vector iterators incompatible" gets thrown especially on fresh start
TODO: figure out details
pull/406/head
Mikhail Titov 9 years ago
parent
commit
8791f382b3
  1. 4
      UPnP.cpp

4
UPnP.cpp

@ -19,6 +19,7 @@
#include "UPnP.h" #include "UPnP.h"
#include "NetDb.h" #include "NetDb.h"
#include "util.h" #include "util.h"
#include "RouterInfo.h"
#include <miniupnpc/miniupnpc.h> #include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h> #include <miniupnpc/upnpcommands.h>
@ -100,7 +101,8 @@ namespace transport
void UPnP::Run () void UPnP::Run ()
{ {
for (auto& address : context.GetRouterInfo ().GetAddresses ()) std::vector<data::RouterInfo::Address> a = context.GetRouterInfo().GetAddresses();
for (auto& address : a)
{ {
if (!address.host.is_v6 ()) if (!address.host.is_v6 ())
{ {

Loading…
Cancel
Save