Control: tags -1 + patch

Hi Robert

On 2018-02-05 06:56:54, Robert Jansen wrote:
> Hello Sebastian,
> 
> Here's a patch so that linphone 3.12.0 can be build with libupnp 1.8.3.

Thanks for the patch. Forwarding to the bug tracker.

Cheers

> 
> I am using Slackware.
> 
> Bye, Robert

>        mbedtls 2.6.1                                libraries/mbedtls         
>                          mbedtls-2.6.1-i586-1_SBo
>      bctoolbox 0.6.0                                libraries/bctoolbox       
>                          bctoolbox-0.6.0-i586-1_SBo
>          mbedtls 2.6.1                              libraries/mbedtls         
>                          mbedtls-2.6.1-i586-1_SBo
>        bctoolbox 0.6.0                              libraries/bctoolbox       
>                          bctoolbox-0.6.0-i586-1_SBo
>        jdk 8u162                                    development/jdk           
>                          jdk-7u80-i586-1
>        libantlr3c 3.4                               libraries/libantlr3c      
>                          libantlr3c-3.4-i486-1_SBo
>        mbedtls 2.6.1                                libraries/mbedtls         
>                          mbedtls-2.6.1-i586-1_SBo
>      belle-sip 1.6.3                                libraries/belle-sip       
>                          belle-sip-1.6.3-i586-1_SBo
>          mbedtls 2.6.1                              libraries/mbedtls         
>                          mbedtls-2.6.1-i586-1_SBo
>        bctoolbox 0.6.0                              libraries/bctoolbox       
>                          bctoolbox-0.6.0-i586-1_SBo
>        mbedtls 2.6.1                                libraries/mbedtls         
>                          mbedtls-2.6.1-i586-1_SBo
>      bzrtp 1.0.6                                    libraries/bzrtp           
>                          bzrtp-1.0.6-i586-1_SBo
>      ffmpeg 3.2.4                                   multimedia/ffmpeg         
>                          ffmpeg-2.6.8-i686_custom-1_SBo
>      libsrtp 1.6.0                                  libraries/libsrtp         
>                          libsrtp-1.6.0-i586-1_SBo
>      libupnp 1.8.3                                  libraries/libupnp         
>                          libupnp-1.8.3-i586-1_SBo
>      mbedtls 2.6.1                                  libraries/mbedtls         
>                          mbedtls-2.6.1-i586-1_SBo
>      speex 1.2.0                                    audio/speex               
>                          speex-1.2.0-i486-1_SBo
>    linphone 3.12.0                                  network/linphone          
>                          linphone-3.12.0-i586-1_SBo
>    x264 20170225                                    multimedia/x264           
>                          x264-20131101-i486-2_SBo
>  msx264 1.5.3                                       libraries/msx264          
>                          msx264-1.5.3-i586-1_SBo

> diff --git a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c 
> b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c
> index 4f7d161..cee436c 100644
> --- a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c
> +++ b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c
> @@ -395,7 +395,7 @@ int upnp_igd_send_action(upnp_igd_context* igd_ctxt, 
> upnp_igd_device_node *devic
>   *   d_event  -- event associated with the new device
>   *
>   
> ********************************************************************************/
> -void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document 
> *desc_doc, struct Upnp_Discovery *d_event) {
> +void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document 
> *desc_doc, UpnpDiscovery *d_event) {
>       upnp_igd_device_node *deviceNode, *tmpdevnode;
>       int found = 0;
>       int ret;
> @@ -423,7 +423,7 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, 
> IXML_Document *desc_doc, st
>       baseURL = upnp_igd_get_first_document_item(igd_ctxt, desc_doc, 
> "URLBase");
>       relURL = upnp_igd_get_first_document_item(igd_ctxt, desc_doc, 
> "presentationURL");
>  
> -     ret = UpnpResolveURL((baseURL ? baseURL : d_event->Location), relURL, 
> presURL);
> +     ret = UpnpResolveURL((baseURL ? baseURL : 
> UpnpString_get_String(UpnpDiscovery_get_Location(d_event))), relURL, presURL);
>  
>       if (UPNP_E_SUCCESS != ret) {
>               upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error generating 
> presURL from %s + %s", baseURL, relURL);
> @@ -444,7 +444,7 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, 
> IXML_Document *desc_doc, st
>                       if (found) {
>                               /* The device is already there, so just update  
> */
>                               /* the advertisement timeout field */
> -                             tmpdevnode->device.advr_time_out = 
> d_event->Expires;
> +                             tmpdevnode->device.advr_time_out = 
> UpnpDiscovery_get_Expires(d_event);
>                               upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "IGD 
> device: %s[%s] | Update expires(%d)", friendlyName, UDN, 
> tmpdevnode->device.advr_time_out);
>                       } else {
>                               upnp_igd_print(igd_ctxt, UPNP_IGD_MESSAGE, "Add 
> IGD device: %s[%s]", friendlyName, UDN);
> @@ -453,12 +453,12 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, 
> IXML_Document *desc_doc, st
>                               deviceNode = (upnp_igd_device_node *)  
> malloc(sizeof(upnp_igd_device_node));
>                               memset(deviceNode->device.services, '\0', 
> sizeof(upnp_igd_service) * IGD_SERVICE_SERVCOUNT);
>                               strncpy(deviceNode->device.udn, UDN, 
> sizeof(deviceNode->device.udn));
> -                             strncpy(deviceNode->device.desc_doc_url, 
> d_event->Location, sizeof(deviceNode->device.desc_doc_url));
> +                             strncpy(deviceNode->device.desc_doc_url, 
> UpnpString_get_String(UpnpDiscovery_get_Location(d_event)), 
> sizeof(deviceNode->device.desc_doc_url));
>                               strncpy(deviceNode->device.friendly_name, 
> friendlyName, sizeof(deviceNode->device.friendly_name));
>                               strncpy(deviceNode->device.model_name, 
> modelName, sizeof(deviceNode->device.model_name));
>                               strncpy(deviceNode->device.model_number, 
> modelNumber, sizeof(deviceNode->device.model_number));
>                               strncpy(deviceNode->device.pres_url, presURL, 
> sizeof(deviceNode->device.pres_url));
> -                             deviceNode->device.advr_time_out = 
> d_event->Expires;
> +                             deviceNode->device.advr_time_out = 
> UpnpDiscovery_get_Expires(d_event);
>  
>                               // Reset values
>                               serviceId = NULL;
> @@ -468,7 +468,7 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, 
> IXML_Document *desc_doc, st
>  
>                               for (service = 0; service < 
> IGD_SERVICE_SERVCOUNT;
>                                    service++) {
> -                                     if 
> (upnp_igd_get_find_and_parse_service(igd_ctxt, desc_doc, d_event->Location,
> +                                     if 
> (upnp_igd_get_find_and_parse_service(igd_ctxt, desc_doc, 
> UpnpString_get_String(UpnpDiscovery_get_Location(d_event)),
>                                                       
> IGDServiceType[service], &serviceId, &event_url, &controlURL)) {
>                                               upnp_igd_print(igd_ctxt, 
> UPNP_IGD_DEBUG, "Subscribing to EventURL %s...",event_url);
>                                               ret =
> @@ -891,16 +891,16 @@ int upnp_igd_callback(Upnp_EventType event_type, void* 
> event, void *cookie) {
>       switch(event_type) {
>       case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
>       case UPNP_DISCOVERY_SEARCH_RESULT: {
> -             struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)event;
> +             UpnpDiscovery *d_event = (UpnpDiscovery *)event;
>               IXML_Document *desc_doc = NULL;
>               int ret;
>  
> -             if (d_event->ErrCode != UPNP_E_SUCCESS) {
> -                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in 
> Discovery Callback -- %d", d_event->ErrCode);
> +             if (UpnpDiscovery_get_ErrCode(d_event) != UPNP_E_SUCCESS) {
> +                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in 
> Discovery Callback -- %d", UpnpDiscovery_get_ErrCode(d_event));
>               }
> -             ret = UpnpDownloadXmlDoc(d_event->Location, &desc_doc);
> +             ret = 
> UpnpDownloadXmlDoc(UpnpString_get_String(UpnpDiscovery_get_Location(d_event)),
>  &desc_doc);
>               if (ret != UPNP_E_SUCCESS) {
> -                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error 
> obtaining device description from %s -- error = %d", d_event->Location, ret);
> +                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error 
> obtaining device description from %s -- error = %d", 
> UpnpString_get_String(UpnpDiscovery_get_Location(d_event)), ret);
>               } else {
>                       upnp_igd_add_device(igd_ctxt, desc_doc, d_event);
>               }
> @@ -910,64 +910,64 @@ int upnp_igd_callback(Upnp_EventType event_type, void* 
> event, void *cookie) {
>       }
>       break;
>       case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: {
> -             struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)event;
> -             if (d_event->ErrCode != UPNP_E_SUCCESS) {
> -                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in 
> Discovery ByeBye Callback -- %d", d_event->ErrCode);
> +             UpnpDiscovery *d_event = (UpnpDiscovery *)event;
> +             if (UpnpDiscovery_get_ErrCode(d_event) != UPNP_E_SUCCESS) {
> +                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in 
> Discovery ByeBye Callback -- %d", UpnpDiscovery_get_ErrCode(d_event));
>               }
> -             upnp_igd_remove_device(igd_ctxt, d_event->DeviceId);
> +             upnp_igd_remove_device(igd_ctxt, 
> UpnpString_get_String(UpnpDiscovery_get_DeviceID(d_event)));
>       }
>       break;
>       /* SOAP Stuff */
>       case UPNP_CONTROL_ACTION_COMPLETE: {
> -             struct Upnp_Action_Complete *a_event = (struct 
> Upnp_Action_Complete *)event;
> +             UpnpActionComplete *a_event = (UpnpActionComplete *)event;
>  
> -             if (a_event->ErrCode != UPNP_E_SUCCESS) {
> -                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in  
> Action Complete Callback -- %d", a_event->ErrCode);
> +             if (UpnpActionComplete_get_ErrCode(a_event) != UPNP_E_SUCCESS) {
> +                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in  
> Action Complete Callback -- %d", UpnpActionComplete_get_ErrCode(a_event));
>               } else {
> -                     upnp_igd_handle_send_action(igd_ctxt, 
> UPNP_STRING(a_event->CtrlUrl), a_event->ActionRequest, a_event->ActionResult);
> +                     upnp_igd_handle_send_action(igd_ctxt, 
> UPNP_STRING(UpnpActionComplete_get_CtrlUrl(a_event)), 
> UpnpActionComplete_get_ActionRequest(a_event), 
> UpnpActionComplete_get_ActionResult(a_event));
>               }
>       }
>       break;
>       case UPNP_CONTROL_GET_VAR_COMPLETE: {
> -             struct Upnp_State_Var_Complete *sv_event = (struct 
> Upnp_State_Var_Complete *)event;
> +             UpnpStateVarComplete *sv_event = (UpnpStateVarComplete *)event;
>  
> -             if (sv_event->ErrCode != UPNP_E_SUCCESS) {
> -                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Get 
> Var Complete Callback -- %d", sv_event->ErrCode);
> +             if (UpnpStateVarComplete_get_ErrCode(sv_event) != 
> UPNP_E_SUCCESS) {
> +                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Get 
> Var Complete Callback -- %d", UpnpStateVarComplete_get_ErrCode(sv_event));
>               } else {
> -                     upnp_igd_handle_get_var(igd_ctxt, 
> UPNP_STRING(sv_event->CtrlUrl), sv_event->StateVarName, sv_event->CurrentVal);
> +                     upnp_igd_handle_get_var(igd_ctxt, 
> UPNP_STRING(UpnpStateVarComplete_get_CtrlUrl(sv_event)), 
> UpnpString_get_String(UpnpStateVarComplete_get_StateVarName(sv_event)), 
> UpnpStateVarComplete_get_CurrentVal(sv_event));
>               }
>       }
>       break;
>       /* GENA Stuff */
>       case UPNP_EVENT_RECEIVED: {
> -             struct Upnp_Event *e_event = (struct Upnp_Event *)event;
> +             UpnpEvent *e_event = (UpnpEvent *)event;
>  
> -             upnp_igd_handle_event(igd_ctxt, e_event->Sid, 
> e_event->EventKey, e_event->ChangedVariables);
> +             upnp_igd_handle_event(igd_ctxt, 
> UpnpString_get_String(UpnpEvent_get_SID(e_event)), 
> UpnpEvent_get_EventKey(e_event), UpnpEvent_get_ChangedVariables(e_event));
>       }
>       break;
>       case UPNP_EVENT_SUBSCRIBE_COMPLETE:
>       case UPNP_EVENT_UNSUBSCRIBE_COMPLETE:
>       case UPNP_EVENT_RENEWAL_COMPLETE: {
> -             struct Upnp_Event_Subscribe *es_event = (struct 
> Upnp_Event_Subscribe *)event;
> +             UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)event;
>  
> -             if (es_event->ErrCode != UPNP_E_SUCCESS) {
> -                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in 
> Event Subscribe Callback -- %d", es_event->ErrCode);
> +             if (UpnpEventSubscribe_get_ErrCode(es_event) != UPNP_E_SUCCESS) 
> {
> +                     upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in 
> Event Subscribe Callback -- %d", UpnpEventSubscribe_get_ErrCode(es_event));
>               } else {
> -                     upnp_igd_handle_subscribe_update(igd_ctxt, 
> UPNP_STRING(es_event->PublisherUrl), es_event->Sid, es_event->TimeOut);
> +                     upnp_igd_handle_subscribe_update(igd_ctxt, 
> UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), 
> UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)), 
> UpnpEventSubscribe_get_TimeOut(es_event));
>               }
>       }
>       break;
>       case UPNP_EVENT_AUTORENEWAL_FAILED:
>       case UPNP_EVENT_SUBSCRIPTION_EXPIRED: {
> -             struct Upnp_Event_Subscribe *es_event = (struct 
> Upnp_Event_Subscribe *)event;
> +             UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)event;
>               int TimeOut = 1801;
>               Upnp_SID newSID;
>               int ret;
>  
> -             ret = UpnpSubscribe(igd_ctxt->upnp_handle, 
> UPNP_STRING(es_event->PublisherUrl), &TimeOut, newSID);
> +             ret = UpnpSubscribe(igd_ctxt->upnp_handle, 
> UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), &TimeOut, newSID);
>               if (ret == UPNP_E_SUCCESS) {
>                       upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "Subscribed to 
> EventURL with SID=%s", newSID);
> -                     upnp_igd_handle_subscribe_update(igd_ctxt, 
> UPNP_STRING(es_event->PublisherUrl), newSID, TimeOut);
> +                     upnp_igd_handle_subscribe_update(igd_ctxt, 
> UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), newSID, TimeOut);
>               } else {
>                       upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error 
> Subscribing to EventURL -- %d", ret);
>               }
> diff --git a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c 
> b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c
> index 108fced..9378b8c 100644
> --- a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c
> +++ b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c
> @@ -103,8 +103,8 @@ int upnp_igd_port_mapping_callback(Upnp_EventType 
> event_type, void* event, void
>  
>       switch(event_type) {
>               case UPNP_CONTROL_ACTION_COMPLETE: {
> -             struct Upnp_Action_Complete *a_event = (struct 
> Upnp_Action_Complete *)event;
> -                     
> upnp_igd_port_mapping_handle_action(igd_port_mapping_ctxt, a_event->ErrCode, 
> UPNP_STRING(a_event->CtrlUrl), a_event->ActionRequest, a_event->ActionResult);
> +             UpnpActionComplete *a_event = (UpnpActionComplete *)event;
> +                     
> upnp_igd_port_mapping_handle_action(igd_port_mapping_ctxt, 
> UpnpActionComplete_get_ErrCode(a_event), 
> UPNP_STRING(UpnpActionComplete_get_CtrlUrl(a_event)), 
> UpnpActionComplete_get_ActionRequest(a_event), 
> UpnpActionComplete_get_ActionResult(a_event));
>               }
>               break;
>  
> diff --git a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c 
> b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c
> index 5329362..075c6be 100644
> --- a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c
> +++ b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c
> @@ -188,18 +188,18 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, 
> upnp_igd_print_level level
>       case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
>       case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE:
>       case UPNP_DISCOVERY_SEARCH_RESULT: {
> -             struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)Event;
> +             UpnpDiscovery *d_event = (UpnpDiscovery *)Event;
>  
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(d_event->ErrCode), 
> d_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "Expires     =  %d",  
> d_event->Expires);
> -             upnp_igd_print(igd_ctxt, level, "DeviceId    =  %s",  
> d_event->DeviceId);
> -             upnp_igd_print(igd_ctxt, level, "DeviceType  =  %s",  
> d_event->DeviceType);
> -             upnp_igd_print(igd_ctxt, level, "ServiceType =  %s",  
> d_event->ServiceType);
> -             upnp_igd_print(igd_ctxt, level, "ServiceVer  =  %s",  
> d_event->ServiceVer);
> -             upnp_igd_print(igd_ctxt, level, "Location    =  %s",  
> d_event->Location);
> -             upnp_igd_print(igd_ctxt, level, "OS          =  %s",  
> d_event->Os);
> -             upnp_igd_print(igd_ctxt, level, "Ext         =  %s",  
> d_event->Ext);
> +                     
> UpnpGetErrorMessage(UpnpDiscovery_get_ErrCode(d_event)), 
> UpnpDiscovery_get_ErrCode(d_event));
> +             upnp_igd_print(igd_ctxt, level, "Expires     =  %d",  
> UpnpDiscovery_get_Expires(d_event));
> +             upnp_igd_print(igd_ctxt, level, "DeviceId    =  %s",  
> UpnpString_get_String(UpnpDiscovery_get_DeviceID(d_event)));
> +             upnp_igd_print(igd_ctxt, level, "DeviceType  =  %s",  
> UpnpString_get_String(UpnpDiscovery_get_DeviceType(d_event)));
> +             upnp_igd_print(igd_ctxt, level, "ServiceType =  %s",  
> UpnpString_get_String(UpnpDiscovery_get_ServiceType(d_event)));
> +             upnp_igd_print(igd_ctxt, level, "ServiceVer  =  %s",  
> UpnpString_get_String(UpnpDiscovery_get_ServiceVer(d_event)));
> +             upnp_igd_print(igd_ctxt, level, "Location    =  %s",  
> UpnpString_get_String(UpnpDiscovery_get_Location(d_event)));
> +             upnp_igd_print(igd_ctxt, level, "OS          =  %s",  
> UpnpString_get_String(UpnpDiscovery_get_Os(d_event)));
> +             upnp_igd_print(igd_ctxt, level, "Ext         =  %s",  
> UpnpString_get_String(UpnpDiscovery_get_Os(d_event)));
>               break;
>       }
>       case UPNP_DISCOVERY_SEARCH_TIMEOUT:
> @@ -207,18 +207,18 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, 
> upnp_igd_print_level level
>               break;
>       /* SOAP */
>       case UPNP_CONTROL_ACTION_REQUEST: {
> -             struct Upnp_Action_Request *a_event =
> -                     (struct Upnp_Action_Request *)Event;
> +             UpnpActionRequest *a_event =
> +                     (UpnpActionRequest *)Event;
>               char *xmlbuff = NULL;
>  
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(a_event->ErrCode), 
> a_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", 
> a_event->ErrStr);
> -             upnp_igd_print(igd_ctxt, level, "ActionName  =  %s", 
> a_event->ActionName);
> -             upnp_igd_print(igd_ctxt, level, "UDN         =  %s", 
> a_event->DevUDN);
> -             upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", 
> a_event->ServiceID);
> -             if (a_event->ActionRequest) {
> -                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)a_event->ActionRequest);
> +                     
> UpnpGetErrorMessage(UpnpActionRequest_get_ErrCode(a_event)), 
> UpnpActionRequest_get_ErrCode(a_event));
> +             upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", 
> UpnpString_get_String(UpnpActionRequest_get_ErrStr(a_event)));
> +             upnp_igd_print(igd_ctxt, level, "ActionName  =  %s", 
> UpnpString_get_String(UpnpActionRequest_get_ActionName(a_event)));
> +             upnp_igd_print(igd_ctxt, level, "UDN         =  %s", 
> UpnpString_get_String(UpnpActionRequest_get_DevUDN(a_event)));
> +             upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", 
> UpnpString_get_String(UpnpActionRequest_get_ServiceID(a_event)));
> +             if (UpnpActionRequest_get_ActionRequest(a_event)) {
> +                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)UpnpActionRequest_get_ActionRequest(a_event));
>                       if (xmlbuff) {
>                               upnp_igd_print(igd_ctxt, level, "ActRequest  =  
> %s", xmlbuff);
>                               ixmlFreeDOMString(xmlbuff);
> @@ -227,8 +227,8 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, 
> upnp_igd_print_level level
>               } else {
>                       upnp_igd_print(igd_ctxt, level, "ActRequest  =  
> (null)");
>               }
> -             if (a_event->ActionResult) {
> -                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)a_event->ActionResult);
> +             if (UpnpActionRequest_get_ActionResult(a_event)) {
> +                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)UpnpActionRequest_get_ActionResult(a_event));
>                       if (xmlbuff) {
>                               upnp_igd_print(igd_ctxt, level, "ActResult   =  
> %s", xmlbuff);
>                               ixmlFreeDOMString(xmlbuff);
> @@ -240,15 +240,15 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, 
> upnp_igd_print_level level
>               break;
>       }
>       case UPNP_CONTROL_ACTION_COMPLETE: {
> -             struct Upnp_Action_Complete *a_event =
> -                     (struct Upnp_Action_Complete *)Event;
> +             UpnpActionComplete *a_event =
> +                     (UpnpActionComplete *)Event;
>               char *xmlbuff = NULL;
>  
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(a_event->ErrCode), 
> a_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", 
> a_event->CtrlUrl);
> -             if (a_event->ActionRequest) {
> -                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)a_event->ActionRequest);
> +                     
> UpnpGetErrorMessage(UpnpActionComplete_get_ErrCode(a_event)), 
> UpnpActionComplete_get_ErrCode(a_event));
> +             upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", 
> UpnpString_get_String(UpnpActionComplete_get_CtrlUrl(a_event)));
> +             if (UpnpActionComplete_get_ActionRequest(a_event)) {
> +                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)UpnpActionComplete_get_ActionRequest(a_event));
>                       if (xmlbuff) {
>                               upnp_igd_print(igd_ctxt, level, "ActRequest  =  
> %s", xmlbuff);
>                               ixmlFreeDOMString(xmlbuff);
> @@ -257,8 +257,8 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, 
> upnp_igd_print_level level
>               } else {
>                       upnp_igd_print(igd_ctxt, level, "ActRequest  =  
> (null)");
>               }
> -             if (a_event->ActionResult) {
> -                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)a_event->ActionResult);
> +             if (UpnpActionComplete_get_ActionResult(a_event)) {
> +                     xmlbuff = ixmlPrintNode((IXML_Node 
> *)UpnpActionComplete_get_ActionResult(a_event));
>                       if (xmlbuff) {
>                               upnp_igd_print(igd_ctxt, level, "ActResult   =  
> %s", xmlbuff);
>                               ixmlFreeDOMString(xmlbuff);
> @@ -270,83 +270,83 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, 
> upnp_igd_print_level level
>               break;
>       }
>       case UPNP_CONTROL_GET_VAR_REQUEST: {
> -             struct Upnp_State_Var_Request *sv_event =
> -                     (struct Upnp_State_Var_Request *)Event;
> +             UpnpStateVarRequest *sv_event =
> +                     (UpnpStateVarRequest *)Event;
>  
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(sv_event->ErrCode), 
> sv_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", 
> sv_event->ErrStr);
> -             upnp_igd_print(igd_ctxt, level, "UDN         =  %s", 
> sv_event->DevUDN);
> -             upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", 
> sv_event->ServiceID);
> -             upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", 
> sv_event->StateVarName);
> -             upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", 
> sv_event->CurrentVal);
> +                     
> UpnpGetErrorMessage(UpnpStateVarRequest_get_ErrCode(sv_event)), 
> UpnpStateVarRequest_get_ErrCode(sv_event));
> +             upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", 
> UpnpString_get_String(UpnpStateVarRequest_get_ErrStr(sv_event)));
> +             upnp_igd_print(igd_ctxt, level, "UDN         =  %s", 
> UpnpString_get_String(UpnpStateVarRequest_get_DevUDN(sv_event)));
> +             upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", 
> UpnpString_get_String(UpnpStateVarRequest_get_ServiceID(sv_event)));
> +             upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", 
> UpnpString_get_String(UpnpStateVarRequest_get_StateVarName(sv_event)));
> +             upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", 
> UpnpStateVarRequest_get_CurrentVal(sv_event));
>               break;
>       }
>       case UPNP_CONTROL_GET_VAR_COMPLETE: {
> -             struct Upnp_State_Var_Complete *sv_event =
> -                     (struct Upnp_State_Var_Complete *)Event;
> +             UpnpStateVarComplete *sv_event =
> +                     (UpnpStateVarComplete *)Event;
>  
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(sv_event->ErrCode), 
> sv_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", 
> sv_event->CtrlUrl);
> -             upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", 
> sv_event->StateVarName);
> -             upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", 
> sv_event->CurrentVal);
> +                     
> UpnpGetErrorMessage(UpnpStateVarComplete_get_ErrCode(sv_event)), 
> UpnpStateVarComplete_get_ErrCode(sv_event));
> +             upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", 
> UpnpString_get_String(UpnpStateVarComplete_get_CtrlUrl(sv_event)));
> +             upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", 
> UpnpString_get_String(UpnpStateVarComplete_get_StateVarName(sv_event)));
> +             upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", 
> UpnpStateVarComplete_get_CurrentVal(sv_event));
>               break;
>       }
>       /* GENA */
>       case UPNP_EVENT_SUBSCRIPTION_REQUEST: {
> -             struct Upnp_Subscription_Request *sr_event =
> -                     (struct Upnp_Subscription_Request *)Event;
> +             UpnpSubscriptionRequest *sr_event =
> +                     (UpnpSubscriptionRequest *)Event;
>  
> -             upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", 
> sr_event->ServiceId);
> -             upnp_igd_print(igd_ctxt, level, "UDN         =  %s", 
> sr_event->UDN);
> -             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> sr_event->Sid);
> +             upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", 
> UpnpString_get_String(UpnpSubscriptionRequest_get_ServiceId(sr_event)));
> +             upnp_igd_print(igd_ctxt, level, "UDN         =  %s", 
> UpnpString_get_String(UpnpSubscriptionRequest_get_UDN(sr_event)));
> +             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> UpnpString_get_String(UpnpSubscriptionRequest_get_SID(sr_event)));
>               break;
>       }
>       case UPNP_EVENT_RECEIVED: {
> -             struct Upnp_Event *e_event = (struct Upnp_Event *)Event;
> +             UpnpEvent *e_event = (UpnpEvent *)Event;
>               char *xmlbuff = NULL;
>  
> -             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> e_event->Sid);
> -             upnp_igd_print(igd_ctxt, level, "EventKey    =  %d",    
> e_event->EventKey);
> -             xmlbuff = ixmlPrintNode((IXML_Node *)e_event->ChangedVariables);
> +             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> UpnpString_get_String(UpnpEvent_get_SID(e_event)));
> +             upnp_igd_print(igd_ctxt, level, "EventKey    =  %d",    
> UpnpEvent_get_EventKey(e_event));
> +             xmlbuff = ixmlPrintNode((IXML_Node 
> *)UpnpEvent_get_ChangedVariables(e_event));
>               upnp_igd_print(igd_ctxt, level, "ChangedVars =  %s", xmlbuff);
>               ixmlFreeDOMString(xmlbuff);
>               xmlbuff = NULL;
>               break;
>       }
>       case UPNP_EVENT_RENEWAL_COMPLETE: {
> -             struct Upnp_Event_Subscribe *es_event =
> -                     (struct Upnp_Event_Subscribe *)Event;
> +             UpnpEventSubscribe *es_event =
> +                     (UpnpEventSubscribe *)Event;
>  
> -             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> es_event->Sid);
> +             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)));
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(es_event->ErrCode), 
> es_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", 
> es_event->TimeOut);
> +                     
> UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), 
> UpnpEventSubscribe_get_ErrCode(es_event));
> +             upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", 
> UpnpEventSubscribe_get_TimeOut(es_event));
>               break;
>       }
>       case UPNP_EVENT_SUBSCRIBE_COMPLETE:
>       case UPNP_EVENT_UNSUBSCRIBE_COMPLETE: {
> -             struct Upnp_Event_Subscribe *es_event =
> -                     (struct Upnp_Event_Subscribe *)Event;
> +             UpnpEventSubscribe *es_event =
> +                     (UpnpEventSubscribe *)Event;
>  
> -             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> es_event->Sid);
> +             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)));
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(es_event->ErrCode), 
> es_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", 
> es_event->PublisherUrl);
> -             upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", 
> es_event->TimeOut);
> +                     
> UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), 
> UpnpEventSubscribe_get_ErrCode(es_event));
> +             upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", 
> UpnpString_get_String(UpnpEventSubscribe_get_PublisherUrl(es_event)));
> +             upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", 
> UpnpEventSubscribe_get_TimeOut(es_event));
>               break;
>       }
>       case UPNP_EVENT_AUTORENEWAL_FAILED:
>       case UPNP_EVENT_SUBSCRIPTION_EXPIRED: {
> -             struct Upnp_Event_Subscribe *es_event =
> -                     (struct Upnp_Event_Subscribe *)Event;
> +             UpnpEventSubscribe *es_event =
> +                     (UpnpEventSubscribe *)Event;
>  
> -             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> es_event->Sid);
> +             upnp_igd_print(igd_ctxt, level, "SID         =  %s", 
> UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)));
>               upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
> -                     UpnpGetErrorMessage(es_event->ErrCode), 
> es_event->ErrCode);
> -             upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", 
> es_event->PublisherUrl);
> -             upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", 
> es_event->TimeOut);
> +                     
> UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), 
> UpnpEventSubscribe_get_ErrCode(es_event));
> +             upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", 
> UpnpString_get_String(UpnpEventSubscribe_get_PublisherUrl(es_event)));
> +             upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", 
> UpnpEventSubscribe_get_TimeOut(es_event));
>               break;
>       }
>       }


-- 
Sebastian Ramacher
diff --git a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c
index 4f7d161..cee436c 100644
--- a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c
+++ b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd.c
@@ -395,7 +395,7 @@ int upnp_igd_send_action(upnp_igd_context* igd_ctxt, upnp_igd_device_node *devic
  *   d_event  -- event associated with the new device
  *
  ********************************************************************************/
-void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, struct Upnp_Discovery *d_event) {
+void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, UpnpDiscovery *d_event) {
 	upnp_igd_device_node *deviceNode, *tmpdevnode;
 	int found = 0;
 	int ret;
@@ -423,7 +423,7 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, st
 	baseURL = upnp_igd_get_first_document_item(igd_ctxt, desc_doc, "URLBase");
 	relURL = upnp_igd_get_first_document_item(igd_ctxt, desc_doc, "presentationURL");
 
-	ret = UpnpResolveURL((baseURL ? baseURL : d_event->Location), relURL, presURL);
+	ret = UpnpResolveURL((baseURL ? baseURL : UpnpString_get_String(UpnpDiscovery_get_Location(d_event))), relURL, presURL);
 
 	if (UPNP_E_SUCCESS != ret) {
 		upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error generating presURL from %s + %s", baseURL, relURL);
@@ -444,7 +444,7 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, st
 			if (found) {
 				/* The device is already there, so just update  */
 				/* the advertisement timeout field */
-				tmpdevnode->device.advr_time_out = d_event->Expires;
+				tmpdevnode->device.advr_time_out = UpnpDiscovery_get_Expires(d_event);
 				upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "IGD device: %s[%s] | Update expires(%d)", friendlyName, UDN, tmpdevnode->device.advr_time_out);
 			} else {
 				upnp_igd_print(igd_ctxt, UPNP_IGD_MESSAGE, "Add IGD device: %s[%s]", friendlyName, UDN);
@@ -453,12 +453,12 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, st
 				deviceNode = (upnp_igd_device_node *)  malloc(sizeof(upnp_igd_device_node));
 				memset(deviceNode->device.services, '\0', sizeof(upnp_igd_service) * IGD_SERVICE_SERVCOUNT);
 				strncpy(deviceNode->device.udn, UDN, sizeof(deviceNode->device.udn));
-				strncpy(deviceNode->device.desc_doc_url, d_event->Location, sizeof(deviceNode->device.desc_doc_url));
+				strncpy(deviceNode->device.desc_doc_url, UpnpString_get_String(UpnpDiscovery_get_Location(d_event)), sizeof(deviceNode->device.desc_doc_url));
 				strncpy(deviceNode->device.friendly_name, friendlyName, sizeof(deviceNode->device.friendly_name));
 				strncpy(deviceNode->device.model_name, modelName, sizeof(deviceNode->device.model_name));
 				strncpy(deviceNode->device.model_number, modelNumber, sizeof(deviceNode->device.model_number));
 				strncpy(deviceNode->device.pres_url, presURL, sizeof(deviceNode->device.pres_url));
-				deviceNode->device.advr_time_out = d_event->Expires;
+				deviceNode->device.advr_time_out = UpnpDiscovery_get_Expires(d_event);
 
 				// Reset values
 				serviceId = NULL;
@@ -468,7 +468,7 @@ void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, st
 
 				for (service = 0; service < IGD_SERVICE_SERVCOUNT;
 				     service++) {
-					if (upnp_igd_get_find_and_parse_service(igd_ctxt, desc_doc, d_event->Location,
+					if (upnp_igd_get_find_and_parse_service(igd_ctxt, desc_doc, UpnpString_get_String(UpnpDiscovery_get_Location(d_event)),
 							IGDServiceType[service], &serviceId, &event_url, &controlURL)) {
 						upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "Subscribing to EventURL %s...",event_url);
 						ret =
@@ -891,16 +891,16 @@ int upnp_igd_callback(Upnp_EventType event_type, void* event, void *cookie) {
 	switch(event_type) {
     	case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
     	case UPNP_DISCOVERY_SEARCH_RESULT: {
-    		struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)event;
+    		UpnpDiscovery *d_event = (UpnpDiscovery *)event;
     		IXML_Document *desc_doc = NULL;
     		int ret;
 
-    		if (d_event->ErrCode != UPNP_E_SUCCESS) {
-    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Discovery Callback -- %d", d_event->ErrCode);
+    		if (UpnpDiscovery_get_ErrCode(d_event) != UPNP_E_SUCCESS) {
+    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Discovery Callback -- %d", UpnpDiscovery_get_ErrCode(d_event));
     		}
-    		ret = UpnpDownloadXmlDoc(d_event->Location, &desc_doc);
+    		ret = UpnpDownloadXmlDoc(UpnpString_get_String(UpnpDiscovery_get_Location(d_event)), &desc_doc);
     		if (ret != UPNP_E_SUCCESS) {
-    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error obtaining device description from %s -- error = %d", d_event->Location, ret);
+    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error obtaining device description from %s -- error = %d", UpnpString_get_String(UpnpDiscovery_get_Location(d_event)), ret);
     		} else {
     			upnp_igd_add_device(igd_ctxt, desc_doc, d_event);
     		}
@@ -910,64 +910,64 @@ int upnp_igd_callback(Upnp_EventType event_type, void* event, void *cookie) {
     	}
     	break;
     	case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: {
-    		struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)event;
-    		if (d_event->ErrCode != UPNP_E_SUCCESS) {
-    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Discovery ByeBye Callback -- %d", d_event->ErrCode);
+    		UpnpDiscovery *d_event = (UpnpDiscovery *)event;
+    		if (UpnpDiscovery_get_ErrCode(d_event) != UPNP_E_SUCCESS) {
+    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Discovery ByeBye Callback -- %d", UpnpDiscovery_get_ErrCode(d_event));
     		}
-    		upnp_igd_remove_device(igd_ctxt, d_event->DeviceId);
+    		upnp_igd_remove_device(igd_ctxt, UpnpString_get_String(UpnpDiscovery_get_DeviceID(d_event)));
     	}
     	break;
     	/* SOAP Stuff */
     	case UPNP_CONTROL_ACTION_COMPLETE: {
-    		struct Upnp_Action_Complete *a_event = (struct Upnp_Action_Complete *)event;
+    		UpnpActionComplete *a_event = (UpnpActionComplete *)event;
 
-    		if (a_event->ErrCode != UPNP_E_SUCCESS) {
-    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in  Action Complete Callback -- %d", a_event->ErrCode);
+    		if (UpnpActionComplete_get_ErrCode(a_event) != UPNP_E_SUCCESS) {
+    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in  Action Complete Callback -- %d", UpnpActionComplete_get_ErrCode(a_event));
     		} else {
-    			upnp_igd_handle_send_action(igd_ctxt, UPNP_STRING(a_event->CtrlUrl), a_event->ActionRequest, a_event->ActionResult);
+    			upnp_igd_handle_send_action(igd_ctxt, UPNP_STRING(UpnpActionComplete_get_CtrlUrl(a_event)), UpnpActionComplete_get_ActionRequest(a_event), UpnpActionComplete_get_ActionResult(a_event));
     		}
     	}
     	break;
     	case UPNP_CONTROL_GET_VAR_COMPLETE: {
-    		struct Upnp_State_Var_Complete *sv_event = (struct Upnp_State_Var_Complete *)event;
+    		UpnpStateVarComplete *sv_event = (UpnpStateVarComplete *)event;
 
-    		if (sv_event->ErrCode != UPNP_E_SUCCESS) {
-    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Get Var Complete Callback -- %d", sv_event->ErrCode);
+    		if (UpnpStateVarComplete_get_ErrCode(sv_event) != UPNP_E_SUCCESS) {
+    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Get Var Complete Callback -- %d", UpnpStateVarComplete_get_ErrCode(sv_event));
     		} else {
-    			upnp_igd_handle_get_var(igd_ctxt, UPNP_STRING(sv_event->CtrlUrl), sv_event->StateVarName, sv_event->CurrentVal);
+    			upnp_igd_handle_get_var(igd_ctxt, UPNP_STRING(UpnpStateVarComplete_get_CtrlUrl(sv_event)), UpnpString_get_String(UpnpStateVarComplete_get_StateVarName(sv_event)), UpnpStateVarComplete_get_CurrentVal(sv_event));
     		}
     	}
     	break;
     	/* GENA Stuff */
     	case UPNP_EVENT_RECEIVED: {
-    		struct Upnp_Event *e_event = (struct Upnp_Event *)event;
+    		UpnpEvent *e_event = (UpnpEvent *)event;
 
-    		upnp_igd_handle_event(igd_ctxt, e_event->Sid, e_event->EventKey, e_event->ChangedVariables);
+    		upnp_igd_handle_event(igd_ctxt, UpnpString_get_String(UpnpEvent_get_SID(e_event)), UpnpEvent_get_EventKey(e_event), UpnpEvent_get_ChangedVariables(e_event));
     	}
     	break;
     	case UPNP_EVENT_SUBSCRIBE_COMPLETE:
     	case UPNP_EVENT_UNSUBSCRIBE_COMPLETE:
     	case UPNP_EVENT_RENEWAL_COMPLETE: {
-    		struct Upnp_Event_Subscribe *es_event = (struct Upnp_Event_Subscribe *)event;
+    		UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)event;
 
-    		if (es_event->ErrCode != UPNP_E_SUCCESS) {
-    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Event Subscribe Callback -- %d", es_event->ErrCode);
+    		if (UpnpEventSubscribe_get_ErrCode(es_event) != UPNP_E_SUCCESS) {
+    			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error in Event Subscribe Callback -- %d", UpnpEventSubscribe_get_ErrCode(es_event));
     		} else {
-    			upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(es_event->PublisherUrl), es_event->Sid, es_event->TimeOut);
+    			upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)), UpnpEventSubscribe_get_TimeOut(es_event));
     		}
     	}
     	break;
     	case UPNP_EVENT_AUTORENEWAL_FAILED:
     	case UPNP_EVENT_SUBSCRIPTION_EXPIRED: {
-    		struct Upnp_Event_Subscribe *es_event = (struct Upnp_Event_Subscribe *)event;
+    		UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)event;
     		int TimeOut = 1801;
     		Upnp_SID newSID;
     		int ret;
 
-    		ret = UpnpSubscribe(igd_ctxt->upnp_handle, UPNP_STRING(es_event->PublisherUrl), &TimeOut, newSID);
+    		ret = UpnpSubscribe(igd_ctxt->upnp_handle, UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), &TimeOut, newSID);
     		if (ret == UPNP_E_SUCCESS) {
     			upnp_igd_print(igd_ctxt, UPNP_IGD_DEBUG, "Subscribed to EventURL with SID=%s", newSID);
-    			upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(es_event->PublisherUrl), newSID, TimeOut);
+    			upnp_igd_handle_subscribe_update(igd_ctxt, UPNP_STRING(UpnpEventSubscribe_get_PublisherUrl(es_event)), newSID, TimeOut);
     		} else {
     			upnp_igd_print(igd_ctxt, UPNP_IGD_ERROR, "Error Subscribing to EventURL -- %d", ret);
     		}
diff --git a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c
index 108fced..9378b8c 100644
--- a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c
+++ b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_cmd.c
@@ -103,8 +103,8 @@ int upnp_igd_port_mapping_callback(Upnp_EventType event_type, void* event, void
 
 	switch(event_type) {
 		case UPNP_CONTROL_ACTION_COMPLETE: {
-		struct Upnp_Action_Complete *a_event = (struct Upnp_Action_Complete *)event;
-			upnp_igd_port_mapping_handle_action(igd_port_mapping_ctxt, a_event->ErrCode, UPNP_STRING(a_event->CtrlUrl), a_event->ActionRequest, a_event->ActionResult);
+		UpnpActionComplete *a_event = (UpnpActionComplete *)event;
+			upnp_igd_port_mapping_handle_action(igd_port_mapping_ctxt, UpnpActionComplete_get_ErrCode(a_event), UPNP_STRING(UpnpActionComplete_get_CtrlUrl(a_event)), UpnpActionComplete_get_ActionRequest(a_event), UpnpActionComplete_get_ActionResult(a_event));
 		}
 		break;
 
diff --git a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c
index 5329362..075c6be 100644
--- a/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c
+++ b/linphone-3.12.0/mediastreamer2/src/upnp/upnp_igd_utils.c
@@ -188,18 +188,18 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level
 	case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
 	case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE:
 	case UPNP_DISCOVERY_SEARCH_RESULT: {
-		struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)Event;
+		UpnpDiscovery *d_event = (UpnpDiscovery *)Event;
 
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(d_event->ErrCode), d_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "Expires     =  %d",  d_event->Expires);
-		upnp_igd_print(igd_ctxt, level, "DeviceId    =  %s",  d_event->DeviceId);
-		upnp_igd_print(igd_ctxt, level, "DeviceType  =  %s",  d_event->DeviceType);
-		upnp_igd_print(igd_ctxt, level, "ServiceType =  %s",  d_event->ServiceType);
-		upnp_igd_print(igd_ctxt, level, "ServiceVer  =  %s",  d_event->ServiceVer);
-		upnp_igd_print(igd_ctxt, level, "Location    =  %s",  d_event->Location);
-		upnp_igd_print(igd_ctxt, level, "OS          =  %s",  d_event->Os);
-		upnp_igd_print(igd_ctxt, level, "Ext         =  %s",  d_event->Ext);
+			UpnpGetErrorMessage(UpnpDiscovery_get_ErrCode(d_event)), UpnpDiscovery_get_ErrCode(d_event));
+		upnp_igd_print(igd_ctxt, level, "Expires     =  %d",  UpnpDiscovery_get_Expires(d_event));
+		upnp_igd_print(igd_ctxt, level, "DeviceId    =  %s",  UpnpString_get_String(UpnpDiscovery_get_DeviceID(d_event)));
+		upnp_igd_print(igd_ctxt, level, "DeviceType  =  %s",  UpnpString_get_String(UpnpDiscovery_get_DeviceType(d_event)));
+		upnp_igd_print(igd_ctxt, level, "ServiceType =  %s",  UpnpString_get_String(UpnpDiscovery_get_ServiceType(d_event)));
+		upnp_igd_print(igd_ctxt, level, "ServiceVer  =  %s",  UpnpString_get_String(UpnpDiscovery_get_ServiceVer(d_event)));
+		upnp_igd_print(igd_ctxt, level, "Location    =  %s",  UpnpString_get_String(UpnpDiscovery_get_Location(d_event)));
+		upnp_igd_print(igd_ctxt, level, "OS          =  %s",  UpnpString_get_String(UpnpDiscovery_get_Os(d_event)));
+		upnp_igd_print(igd_ctxt, level, "Ext         =  %s",  UpnpString_get_String(UpnpDiscovery_get_Os(d_event)));
 		break;
 	}
 	case UPNP_DISCOVERY_SEARCH_TIMEOUT:
@@ -207,18 +207,18 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level
 		break;
 	/* SOAP */
 	case UPNP_CONTROL_ACTION_REQUEST: {
-		struct Upnp_Action_Request *a_event =
-			(struct Upnp_Action_Request *)Event;
+		UpnpActionRequest *a_event =
+			(UpnpActionRequest *)Event;
 		char *xmlbuff = NULL;
 
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(a_event->ErrCode), a_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", a_event->ErrStr);
-		upnp_igd_print(igd_ctxt, level, "ActionName  =  %s", a_event->ActionName);
-		upnp_igd_print(igd_ctxt, level, "UDN         =  %s", a_event->DevUDN);
-		upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", a_event->ServiceID);
-		if (a_event->ActionRequest) {
-			xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionRequest);
+			UpnpGetErrorMessage(UpnpActionRequest_get_ErrCode(a_event)), UpnpActionRequest_get_ErrCode(a_event));
+		upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", UpnpString_get_String(UpnpActionRequest_get_ErrStr(a_event)));
+		upnp_igd_print(igd_ctxt, level, "ActionName  =  %s", UpnpString_get_String(UpnpActionRequest_get_ActionName(a_event)));
+		upnp_igd_print(igd_ctxt, level, "UDN         =  %s", UpnpString_get_String(UpnpActionRequest_get_DevUDN(a_event)));
+		upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", UpnpString_get_String(UpnpActionRequest_get_ServiceID(a_event)));
+		if (UpnpActionRequest_get_ActionRequest(a_event)) {
+			xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionRequest_get_ActionRequest(a_event));
 			if (xmlbuff) {
 				upnp_igd_print(igd_ctxt, level, "ActRequest  =  %s", xmlbuff);
 				ixmlFreeDOMString(xmlbuff);
@@ -227,8 +227,8 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level
 		} else {
 			upnp_igd_print(igd_ctxt, level, "ActRequest  =  (null)");
 		}
-		if (a_event->ActionResult) {
-			xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionResult);
+		if (UpnpActionRequest_get_ActionResult(a_event)) {
+			xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionRequest_get_ActionResult(a_event));
 			if (xmlbuff) {
 				upnp_igd_print(igd_ctxt, level, "ActResult   =  %s", xmlbuff);
 				ixmlFreeDOMString(xmlbuff);
@@ -240,15 +240,15 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level
 		break;
 	}
 	case UPNP_CONTROL_ACTION_COMPLETE: {
-		struct Upnp_Action_Complete *a_event =
-			(struct Upnp_Action_Complete *)Event;
+		UpnpActionComplete *a_event =
+			(UpnpActionComplete *)Event;
 		char *xmlbuff = NULL;
 
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(a_event->ErrCode), a_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", a_event->CtrlUrl);
-		if (a_event->ActionRequest) {
-			xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionRequest);
+			UpnpGetErrorMessage(UpnpActionComplete_get_ErrCode(a_event)), UpnpActionComplete_get_ErrCode(a_event));
+		upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", UpnpString_get_String(UpnpActionComplete_get_CtrlUrl(a_event)));
+		if (UpnpActionComplete_get_ActionRequest(a_event)) {
+			xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionComplete_get_ActionRequest(a_event));
 			if (xmlbuff) {
 				upnp_igd_print(igd_ctxt, level, "ActRequest  =  %s", xmlbuff);
 				ixmlFreeDOMString(xmlbuff);
@@ -257,8 +257,8 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level
 		} else {
 			upnp_igd_print(igd_ctxt, level, "ActRequest  =  (null)");
 		}
-		if (a_event->ActionResult) {
-			xmlbuff = ixmlPrintNode((IXML_Node *)a_event->ActionResult);
+		if (UpnpActionComplete_get_ActionResult(a_event)) {
+			xmlbuff = ixmlPrintNode((IXML_Node *)UpnpActionComplete_get_ActionResult(a_event));
 			if (xmlbuff) {
 				upnp_igd_print(igd_ctxt, level, "ActResult   =  %s", xmlbuff);
 				ixmlFreeDOMString(xmlbuff);
@@ -270,83 +270,83 @@ void upnp_igd_print_event(upnp_igd_context *igd_ctxt, upnp_igd_print_level level
 		break;
 	}
 	case UPNP_CONTROL_GET_VAR_REQUEST: {
-		struct Upnp_State_Var_Request *sv_event =
-			(struct Upnp_State_Var_Request *)Event;
+		UpnpStateVarRequest *sv_event =
+			(UpnpStateVarRequest *)Event;
 
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(sv_event->ErrCode), sv_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", sv_event->ErrStr);
-		upnp_igd_print(igd_ctxt, level, "UDN         =  %s", sv_event->DevUDN);
-		upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", sv_event->ServiceID);
-		upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", sv_event->StateVarName);
-		upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", sv_event->CurrentVal);
+			UpnpGetErrorMessage(UpnpStateVarRequest_get_ErrCode(sv_event)), UpnpStateVarRequest_get_ErrCode(sv_event));
+		upnp_igd_print(igd_ctxt, level, "ErrStr      =  %s", UpnpString_get_String(UpnpStateVarRequest_get_ErrStr(sv_event)));
+		upnp_igd_print(igd_ctxt, level, "UDN         =  %s", UpnpString_get_String(UpnpStateVarRequest_get_DevUDN(sv_event)));
+		upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", UpnpString_get_String(UpnpStateVarRequest_get_ServiceID(sv_event)));
+		upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", UpnpString_get_String(UpnpStateVarRequest_get_StateVarName(sv_event)));
+		upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", UpnpStateVarRequest_get_CurrentVal(sv_event));
 		break;
 	}
 	case UPNP_CONTROL_GET_VAR_COMPLETE: {
-		struct Upnp_State_Var_Complete *sv_event =
-			(struct Upnp_State_Var_Complete *)Event;
+		UpnpStateVarComplete *sv_event =
+			(UpnpStateVarComplete *)Event;
 
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(sv_event->ErrCode), sv_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", sv_event->CtrlUrl);
-		upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", sv_event->StateVarName);
-		upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", sv_event->CurrentVal);
+			UpnpGetErrorMessage(UpnpStateVarComplete_get_ErrCode(sv_event)), UpnpStateVarComplete_get_ErrCode(sv_event));
+		upnp_igd_print(igd_ctxt, level, "CtrlUrl     =  %s", UpnpString_get_String(UpnpStateVarComplete_get_CtrlUrl(sv_event)));
+		upnp_igd_print(igd_ctxt, level, "StateVarName=  %s", UpnpString_get_String(UpnpStateVarComplete_get_StateVarName(sv_event)));
+		upnp_igd_print(igd_ctxt, level, "CurrentVal  =  %s", UpnpStateVarComplete_get_CurrentVal(sv_event));
 		break;
 	}
 	/* GENA */
 	case UPNP_EVENT_SUBSCRIPTION_REQUEST: {
-		struct Upnp_Subscription_Request *sr_event =
-			(struct Upnp_Subscription_Request *)Event;
+		UpnpSubscriptionRequest *sr_event =
+			(UpnpSubscriptionRequest *)Event;
 
-		upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", sr_event->ServiceId);
-		upnp_igd_print(igd_ctxt, level, "UDN         =  %s", sr_event->UDN);
-		upnp_igd_print(igd_ctxt, level, "SID         =  %s", sr_event->Sid);
+		upnp_igd_print(igd_ctxt, level, "ServiceID   =  %s", UpnpString_get_String(UpnpSubscriptionRequest_get_ServiceId(sr_event)));
+		upnp_igd_print(igd_ctxt, level, "UDN         =  %s", UpnpString_get_String(UpnpSubscriptionRequest_get_UDN(sr_event)));
+		upnp_igd_print(igd_ctxt, level, "SID         =  %s", UpnpString_get_String(UpnpSubscriptionRequest_get_SID(sr_event)));
 		break;
 	}
 	case UPNP_EVENT_RECEIVED: {
-		struct Upnp_Event *e_event = (struct Upnp_Event *)Event;
+		UpnpEvent *e_event = (UpnpEvent *)Event;
 		char *xmlbuff = NULL;
 
-		upnp_igd_print(igd_ctxt, level, "SID         =  %s", e_event->Sid);
-		upnp_igd_print(igd_ctxt, level, "EventKey    =  %d",	e_event->EventKey);
-		xmlbuff = ixmlPrintNode((IXML_Node *)e_event->ChangedVariables);
+		upnp_igd_print(igd_ctxt, level, "SID         =  %s", UpnpString_get_String(UpnpEvent_get_SID(e_event)));
+		upnp_igd_print(igd_ctxt, level, "EventKey    =  %d",	UpnpEvent_get_EventKey(e_event));
+		xmlbuff = ixmlPrintNode((IXML_Node *)UpnpEvent_get_ChangedVariables(e_event));
 		upnp_igd_print(igd_ctxt, level, "ChangedVars =  %s", xmlbuff);
 		ixmlFreeDOMString(xmlbuff);
 		xmlbuff = NULL;
 		break;
 	}
 	case UPNP_EVENT_RENEWAL_COMPLETE: {
-		struct Upnp_Event_Subscribe *es_event =
-			(struct Upnp_Event_Subscribe *)Event;
+		UpnpEventSubscribe *es_event =
+			(UpnpEventSubscribe *)Event;
 
-		upnp_igd_print(igd_ctxt, level, "SID         =  %s", es_event->Sid);
+		upnp_igd_print(igd_ctxt, level, "SID         =  %s", UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)));
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(es_event->ErrCode), es_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", es_event->TimeOut);
+			UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), UpnpEventSubscribe_get_ErrCode(es_event));
+		upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", UpnpEventSubscribe_get_TimeOut(es_event));
 		break;
 	}
 	case UPNP_EVENT_SUBSCRIBE_COMPLETE:
 	case UPNP_EVENT_UNSUBSCRIBE_COMPLETE: {
-		struct Upnp_Event_Subscribe *es_event =
-			(struct Upnp_Event_Subscribe *)Event;
+		UpnpEventSubscribe *es_event =
+			(UpnpEventSubscribe *)Event;
 
-		upnp_igd_print(igd_ctxt, level, "SID         =  %s", es_event->Sid);
+		upnp_igd_print(igd_ctxt, level, "SID         =  %s", UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)));
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(es_event->ErrCode), es_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", es_event->PublisherUrl);
-		upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", es_event->TimeOut);
+			UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), UpnpEventSubscribe_get_ErrCode(es_event));
+		upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", UpnpString_get_String(UpnpEventSubscribe_get_PublisherUrl(es_event)));
+		upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", UpnpEventSubscribe_get_TimeOut(es_event));
 		break;
 	}
 	case UPNP_EVENT_AUTORENEWAL_FAILED:
 	case UPNP_EVENT_SUBSCRIPTION_EXPIRED: {
-		struct Upnp_Event_Subscribe *es_event =
-			(struct Upnp_Event_Subscribe *)Event;
+		UpnpEventSubscribe *es_event =
+			(UpnpEventSubscribe *)Event;
 
-		upnp_igd_print(igd_ctxt, level, "SID         =  %s", es_event->Sid);
+		upnp_igd_print(igd_ctxt, level, "SID         =  %s", UpnpString_get_String(UpnpEventSubscribe_get_SID(es_event)));
 		upnp_igd_print(igd_ctxt, level, "ErrCode     =  %s(%d)",
-			UpnpGetErrorMessage(es_event->ErrCode), es_event->ErrCode);
-		upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", es_event->PublisherUrl);
-		upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", es_event->TimeOut);
+			UpnpGetErrorMessage(UpnpEventSubscribe_get_ErrCode(es_event)), UpnpEventSubscribe_get_ErrCode(es_event));
+		upnp_igd_print(igd_ctxt, level, "PublisherURL=  %s", UpnpString_get_String(UpnpEventSubscribe_get_PublisherUrl(es_event)));
+		upnp_igd_print(igd_ctxt, level, "TimeOut     =  %d", UpnpEventSubscribe_get_TimeOut(es_event));
 		break;
 	}
 	}

Attachment: signature.asc
Description: PGP signature

Reply via email to