srv_regnowatch

Description

Remove a client thread from the notification list for a registered procedure.

Syntax

CS_RETCODE srv_regnowatch(spp, procnamep, 
                       namelen, infop)
SRV_PROC         *spp;
CS_CHAR          *procnamep;
CS_INT               namelen;
CS_INT             *infop;

Parameters

spp

A pointer to an internal thread control structure.

procnamep

A pointer to the name of the procedure.

namelen

The length of the procedure name. If the name is null terminated, namelen can be CS_NULLTERM.

infop

A pointer to a CS_INT. Table 3-100 describes the possible values returned in *infop if srv_regnowatch returns CS_FAIL:

Table 3-100: Values for infop (srv_regnowatch)

Value

Description

SRV_I_PNOTCLIENT

A non-client thread was specified.

SRV_I_PNOTKNOWN

The procedure is not known to the Open Server application.

SRV_I_PNOPENDING

The thread is not on the notification list for this procedure.

SRV_I_PPARAMERR

A parameter error occurred.

SRV_I_UNKNOWN

Some other error occurred.

Returns

Table 3-101:  Return values (srv_regnowatch)

Returns

To indicate

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

Examples

Example 1

#include   <ospublic.h>

/*
** Local Prototype.
*/
extern CS_RETCODE  ex_srv_regnowatch PROTOTYPE((
CS_VOID         *spp,
CS_CHAR         *procnamep,
CS_INT          namelen
));

/* 
** EX_SRV_REGNOWATCH
**
**    Remove a client thread from the notification list for the
**    specified registered procedure.
**
** Arguments:
**   spp           A pointer to an internal thread control 
                   structure.
**   procnamep     A pointer to the name of the registered 
                   procedure.
**   namelen      The length of the registered procedure name.
**
** Returns:
**   CS_SUCCEED    The thread was removed from notification list.
**   CS_FAIL       An error was detected.
*/
CS_RETCODE      ex_srv_regnowatch(spp, procnamep, namelen)
SRV_PROC        *spp;
CS_CHAR         *procnamep;
CS_INT          namelen;
{
      if(srv_regnowatch(spp, procnamep, namelen, (CS_INT *)NULL)
           == CS_FAIL)
      {
           return(CS_FAIL);
      }
      return(CS_SUCCEED);
}

Usage

See also

srv_regwatch, srv_regwatchlist