Return the number component of the current remote procedure call’s designation.
CS_INT srv_rpcnumber(spp)
SRV_PROC *spp;
A pointer to an internal thread control structure.
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. |
#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));
}
srv_rpcnumber returns the number component of the current remote procedure call (“RPC”) designation.
srv_rpcnumber returns only the number component of the RPC’s designation and does not include anything else, such as optional specifiers for owner or RPC name. A fully qualified designation for an RPC takes the form database.owner.rpcname;number. To get the other parts of the RPC’s designation, if any, use srv_rpcname, srv_rpcowner, and srv_rpcdb.
srv_numparams, srv_rpcdb, srv_rpcname, srv_rpcoptions, srv_rpcowner