srv_sendstatus

Description

Send a status value to a client.

Syntax

CS_RETCODE srv_sendstatus(spp, value)
SRV_PROC        *spp;
CS_INT              value;

Parameters

spp

A pointer to an internal thread control structure.

value

The status of the request. By convention, 0 means the request completed normally.

Returns

Table 3-124: Return values (srv_sendstatus)

Returns

To indicate

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

Examples

Example 1

#include    <ospublic.h>

/*
** Local prototype.
*/
CS_RETCODE        ex_srv_sendstatus PROTOTYPE((
SRV_PROC          *spp
));

/*
** EX_SRV_SENDSTATUS
**
**  Example routine to send a status value to a client.
**
** Arguments:
**    spp      A pointer to an internal thread control structure.
**
** Returns:
**  CS_SUCCEED if we were able to send the status.
**  CS_FAIL if an error was detected.
**
*/
CS_RETCODE    ex_srv_sendstatus(spp)
SRV_PROC      *spp;
{
      CS_RETCODE      result;

      /* 
      ** Send an OK status.
      */
      result = srv_sendstatus(spp, (CS_INT)0);

      return (result);
}

Usage

See also

srv_senddone