Prosody generic: API: sm_download_fmw

This function is only in Prosody version 1 (but see the conversion guide for further details, including a facility that emulates it).

Prototype Definition

int sm_download_fmw(struct sm_download_parms *downloadp)

Parameters

*downloadp
a structure of the following type:
typedef struct sm_download_parms {
	tSMModuleId module;					/* in */
	tSM_INT id;						/* in */
	char *filename;						/* in */
} SM_DOWNLOAD_PARMS;

Description

Resets given module then downloads firmware in given file (must be ".smf" format firmware file) to that module and starts it running.

If all modules installed in the system are to run the same firmware, id should be set to zero. If however multiple modules are to be loaded with diverse types of firmware then the id parameter may be set to a non-zero application chosen identifier for the firmware actually downloaded. This same id may be later specified in calls to sm_channel_alloc() in order to ensure that channels are allocated to modules running appropriate firmware.

Only on Prosody S: Not supported by Prosody S.

Fields

module (Only in Prosody version 1)
A value obtained from sm_open_module() which indicates the module to download onto.
id (Only in Prosody version 1)
Zero, or an arbitrary firmware identifier you have chosen.
filename (Only in Prosody version 1)
The name of the file containing the firmware to download.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody generic API.