srv_rpcnumber

Description

Return the number component of the current remote procedure call’s designation.

Syntax

CS_INT srv_rpcnumber(spp)
SRV_PROC *spp;

Parameters

spp

A pointer to an internal thread control structure.

Returns

Table 3-109:  Return values (srv_rpcnumber)

Returns

To indicate

A non-zero integer

The number component of the current RPC’s designation.

-1

There is no current RPC.

Open Server sets lenp to -1 and raises an informational error.

0

The client did not include a number component when it invoked the RPC.

Examples

Example 1

#include    <ospublic.h>
/*
** Local Prototype.
*/
CS_INT     ex_srv_rpcnumber PROTOTYPE((
SRV_PROC   *spp
));

/*
** EX_SRV_RCPNUMBER
**
**    Example routine to show hiw to get the number of the
 **    current RPC designation.
**    
**
** Arguments:
**
**   spp   A pointer to an internal thread control structure.
**
** Returns:
**
**    The number component of the current RPC’s designation. If
 **    the client used no number component when it invoked the
 **    RPC, 0 is returned. If there is not a current RPC, -1 is
 **    returned and Open Server raises an informational error. 
 */
CS_INT     ex_srv_rpcnumber(spp)
SRV_PROC   *spp;
{
      /* Check arguments. */
      if(spp == (SRV_PROC *)NULL)
      {
             return(-1);
      }
      return((CS_INT)srv_rpcnumber(spp));
}

Usage

See also

srv_numparams, srv_rpcdb, srv_rpcname, srv_rpcoptions, srv_rpcowner