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

EXPORT_SPEC int UpnpSetMaxContentLength ( size_t  contentLength  ) 

Sets the maximum content-length that the SDK will process on an incoming SOAP requests or responses.

This API allows devices that have memory constraints to exhibit consistent behaviour if the size of the incoming SOAP message exceeds the memory that device can allocate.

The default maximum content-length is DEFAULT_SOAP_CONTENT_LENGTH = 16K bytes.

An integer representing one of the following:
  • UPNP_E_SUCCESS: The operation completed successfully.
contentLength  [in] The maximum permissible content length for incoming SOAP actions, in bytes.

Definition at line 3917 of file upnpapi.c.

References g_maxContentLength, UPNP_E_FINISH, and UpnpSdkInit.

      int errCode = UPNP_E_SUCCESS;

      do {
            if (UpnpSdkInit != 1) {
                  errCode = UPNP_E_FINISH;
            g_maxContentLength = contentLength;
      } while(0);

      return errCode;

Generated by  Doxygen 1.6.0   Back to index