Commit 07ca1256 authored by Yann Diorcet's avatar Yann Diorcet

Add a retvalue in upnp igd port mapping

parent f9e4fed0
......@@ -39,6 +39,7 @@ typedef struct _upnp_igd_port_mapping {
const char* description;
void *cookie;
int retvalue;
} upnp_igd_port_mapping;
typedef void (*upnp_igd_callback_function)(void *cookie, upnp_igd_event event, void *arg);
......
......@@ -37,6 +37,7 @@ int upnp_igd_port_mapping_handle_action(upnp_igd_port_mapping_context *igd_port_
if(node && node->nodeType == eELEMENT_NODE) {
ctmpstate = ixmlNode_getLocalName(node);
if(ctmpstate != NULL) {
igd_port_mapping_ctxt->mapping.retvalue = errcode; // Set the return value
if(strcmp(ctmpstate, "AddPortMapping") == 0) {
if(errcode == UPNP_E_SUCCESS)
igd_ctxt->callback_fct(igd_ctxt->cookie, UPNP_IGD_PORT_MAPPING_ADD_SUCCESS, &igd_port_mapping_ctxt->mapping);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment