srv_regwatchlist

Description

Return a list of all registered procedures for which a client thread has notification requests pending.

Syntax

CS_RETCODE srv_regwatchlist(spp, proclistp)
SRV_PROC               *spp;
SRV_PROCLIST        **proclistp;

Parameters

spp

A pointer to an internal thread control structure.

proclistp

A pointer to a pointer to a structure that contains the number of registered procedures and the names of each registered procedure. Open Server allocates the space for this structure.

Returns

Table 3-106:  Return values (srv_regwatchlist)

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_regwatchlist PROTOTYPE((
SRV_PROC       *spp
));

/* 
** EX_SRV_REGWATCHLIST
**
**    Example routine to get a list of all registered procedures
**    for which a client thread has notifications pending.
**
** Arguments:
**    spp      A pointer to an internal thread control structure.
**
** Returns:
**
**    CS_SUCCEED    The list returned successfully.
**    CS_FAIL       An error was detected.
*/
CS_RETCODE      ex_srv_regwatchlist(spp)
SRV_PROC        *spp;
{
     SRV_PROCLIST  *listp;

     if (srv_regwatchlist(spp, &listp) == CS_FAIL)
           return (CS_FAIL);

      /* 
      **   Process the information in the list and free the 
      **   memory allocated for the list.
      */
      (CS_VOID)srv_reglistfree(spp, listp);

      return (CS_SUCCEED);
}

Usage

See also

srv_reglistfree