RSP_nextServerModule

Name

RSP_nextServerModule -- Returns next module data structure in chain.

Synopsis

RSP_module* RSP_nextServerModule(RSP_server *server);

Description

This function, given a valid RSP_server, will return the next RSP_module structure as retrieved by RSP_serverConnect. If all modules have already been returned, then NULL is returned and the pointer to the current module is reset to the beginning of the list (so the next call to this function will return the first element, and the second after that, and so on).

The RSP_module structure contains the current data for the module. It is defined as follows:

typedef struct _RSP_module
{
	char *name;
	char *data;
	int threshCrossed;
} RSP_module;
				

Note that if an error occurs, NULL is returned by this function, but it doesn't mean that all memory has been freed from the RSP_server structure. Thus, a subsequent call to RSP_serverFree should still be made.

Returns

The next RSP_module structure, as downloaded from the RSPD in a previous call to RSP_serverConnect.

Error Conditions

If the server argument is NULL (or somehow improperly setup), this routine will return NULL. Note that RSP_server may still be valid, so if NULL is returned by this function, a graceful cleanup would require a call to RSP_serverFree(server).