Logo Search packages:      
Sourcecode: libupnp4 version File versions  Download package

EXPORT_SPEC int UpnpSetContentLength ( UpnpClient_Handle  Hnd,
int  contentLength 
)

Deprecated:
Use UpnpSetMaxContentLength instead.
Warning: the Handle argument provided here is not used, so the effect of this function is global to the SDK (= same as UpnpSetMaxContentLength).
Parameters:
Hnd  [in] The handle of the device instance for which the coincoming content length needs to be set.
contentLength  [in] Permissible content length

Definition at line 3882 of file upnpapi.c.

References g_maxContentLength, GetHandleInfo(), UPNP_E_FINISH, UPNP_E_INVALID_HANDLE, and UpnpSdkInit.

{
      int errCode = UPNP_E_SUCCESS;
      struct Handle_Info *HInfo = NULL;

      do {
            if (UpnpSdkInit != 1) {
                  errCode = UPNP_E_FINISH;
                  break;
            }

            HandleLock();

            errCode = GetHandleInfo(Hnd, &HInfo);

            if (errCode != HND_DEVICE) {
                  errCode = UPNP_E_INVALID_HANDLE;
                  break;
            }

            if (contentLength > MAX_SOAP_CONTENT_LENGTH) {
                  errCode = UPNP_E_OUTOF_BOUNDS;
                  break;
            }

            g_maxContentLength = contentLength;
      } while(0);

      HandleUnlock();
      return errCode;
}


Generated by  Doxygen 1.6.0   Back to index