Skip to content
Snippets Groups Projects
Commit 1a6cc728 authored by Mohamed Chibani's avatar Mohamed Chibani Committed by Sébastien Blin
Browse files

upnp: code improvements and bug fixes

This patch adds many improvements and bug fixes:
1- For PUPNP lib, use the synchronous methods for add and remove
requests. The async versions have many issues mainly at shutdown.
If the callbacks do not arrive on time, the memory allocated by
the lib when performing the request will leak.
2- Rework the init and IGD search of PUPNP.
3- Move the termination step (for libupnp in particular) from
the destructor to a newly added method (termiinate()). This will
prevent a race at shutdown between libupnp threads (callbacks) and
the daemon shutdown process.
4- Do not try to initialize libupnp if the host address is invalid.
This will prevent putting the lib in an unstable state.

Gitlab: #472

Change-Id: I14e5ddcd2b735da374a1f09bcef40f6a86a38133
parent cf654cd8
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment