Prosody generic: API: sm_module_status

Prototype Definition

int sm_module_status(struct sm_module_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_module_status_parms {
	tSMModuleId module_id;					/* in */
	enum kSMModuleStatus {
		kSMModuleStatusRunning,
		kSMModuleStatusShutdown,
	} status;						/* out */
} SM_MODULE_STATUS_PARMS;

Description

Reports the status of a Prosody module connection that was opened with sm_open_module(). Card types that use asynchronous control methods may block in sm_close_module(). After using sm_shutdown_module() to initiate the closing of a module, this function will report a status of kSMModuleStatusShutdown when sm_close_module() will not block.

Fields

module_id
The value obtained from sm_open_module() to be closed.
status
One of these values:
kSMModuleStatusRunning
The module connection is running.
kSMModuleStatusShutdown
The module connection has been shutdown.

Returns

0 if call completed successfully, otherwise a standard error.


This function is part of the Prosody generic API.