(UPnP) Minor refactor (#13510)

Don't clear up the request at natt_close_port.
This commit is contained in:
Cthulhu-throwaway 2022-01-18 09:03:32 -03:00 committed by GitHub
parent 979428649a
commit c50087efdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@
#include <net/net_natt.h>
#if defined(_WIN32)
#ifdef _WIN32
#include <iphlpapi.h>
#endif
@ -631,9 +631,7 @@ static void natt_close_port_cb(retro_task_t *task, void *task_data,
if (data->status != 200)
goto done;
/* We don't need to do anything special here.
* Just clear up the request. */
memset(request, 0, sizeof(*request));
/* We don't need to do anything special here. */
request->success = true;
done:

View File

@ -254,6 +254,8 @@ static void task_netplay_nat_traversal_handler(retro_task_t *task)
case NAT_TRAVERSAL_STATUS_CLOSING:
{
memset(&data->request, 0, sizeof(data->request));
data->status = NAT_TRAVERSAL_STATUS_CLOSED;
goto finished;