TCPIP_HTTP_NET_SSIVariableSet Function

C

bool TCPIP_HTTP_NET_SSIVariableSet(
    const char* varName, 
    TCPIP_HTTP_DYN_ARG_TYPE varType, 
    const char* strValue, 
    int32_t intValue
);

Description

This function sets the new values for an SSI variable. If a variable with such name does not exist, it is created.

Preconditions

The HTTP module should have been initialized. SSI should be enabled.

Parameters

ParametersDescription
varNameThe SSI variable name.
varTypeThe type of the SSI variable.
strValuePointer to the string representation of the variable.
intValueThe integer value of the variable, if the type is integer.

Returns

  • True - If the variable was updated or created successfully

  • False - The variable didn't exist and the attempt to create it failed (all slots already in use. Increase TCPIP_HTTP_NET_SSI_VARIABLES_NUMBER()).

Remarks

The string variable interpretation is needed even if the variable is of integer type. HTTP module will use that representation instead of doing a conversion to string of the intValue. The string representation should not exceed TCPIP_HTTP_NET_SSI_VARIABLE_STRING_MAX_LENGTH(). Any excess variables will be truncated.