Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upnpDiscover method signature has changed and build crashes. #41

Open
cdberkstresser opened this issue Jan 6, 2019 · 2 comments
Open

Comments

@cdberkstresser
Copy link

cdberkstresser commented Jan 6, 2019

The upnpDiscover method signature of the miniupnpc package has changed from
upnpDiscover(int delay, const char * multicastif, const char * minissdpdsock, int localport, int ipv6, int * error);
to
upnpDiscover(int delay, const char * multicastif, const char * minissdpdsock, int localport, int ipv6, unsigned char ttl, int * error);
causing the build to crash with MINIUPNPC_VERSION = 2.1. (E.g On Ubuntu 18.10)
I added an unsigned char ttl to the function call to fix it on my machine, but it looks like there may be three method signatures to track now rather than two.

@Serhii-Melnyk
Copy link

on the web found patch, tried - looks like i've built it. Hooray!
in /src/net.cpp:1037 "devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);" added "2" got "devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);"
used info from https://github.com/bitcoin/bitcoin/commit/9f3e48e5219a09b5ddfd6883d1f0498910eff4b6.patch

it works! (disabled upnp in options, direct connection, no router used)
synchronizing...

@Serhii-Melnyk
Copy link

i'm totally not a programmer hope this wont break something :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants