- Notifications
You must be signed in to change notification settings - Fork124
Open
Description
I get a link error while building upnp with UPNP_ENABLE_SOAP disabled:
Error LNK2019unresolved external symbolFindServiceControlURLPath referenced in functionGetDeviceHandleInfoForPath pnp_shared
The functionFindServiceControlURLPath is only declare ifEXCLUDE_SOAP == 0 in upnpapi.c
My work around for this in theGetDeviceHandleInfoForPath function is:
Upnp_Handle_TypeGetDeviceHandleInfoForPath(constchar*path,intAddressFamily,UpnpDevice_Handle*device_handle_out,structHandle_Info**HndInfo,service_info**serv_info){#ifdefINCLUDE_DEVICE_APIS/* Check if we've got a registered device of the address family * specified. */if ((AddressFamily==AF_INET&&UpnpSdkDeviceRegisteredV4==0)||(AddressFamily==AF_INET6&&UpnpSdkDeviceregisteredV6==0)) {*device_handle_out=-1;returnHND_INVALID;}/* Find it. */for (*device_handle_out=1;*device_handle_out<NUM_HANDLE;(*device_handle_out)++) {switch (GetHandleInfo(*device_handle_out,HndInfo)) {caseHND_DEVICE:if ((*HndInfo)->DeviceAf==AddressFamily) {#ifEXCLUDE_SOAP==0if ((*serv_info=FindServiceControlURLPath(&(*HndInfo)->ServiceTable,path))||(*serv_info=FindServiceEventURLPath(&(*HndInfo)->ServiceTable,path))) {returnHND_DEVICE;}#elseif ((*serv_info=FindServiceEventURLPath(&(*HndInfo)->ServiceTable,path))) {returnHND_DEVICE;}#endif/* EXCLUDE_SOAP */}break;default:break;}}#endif/* INCLUDE_DEVICE_APIS */*device_handle_out=-1;returnHND_INVALID;}
I don't know though if this is a correct fix. I am using libupnp 1.14.20
Metadata
Metadata
Assignees
Labels
No labels