OSI/MHS Management Programming Manual

Examples
OSI/MHS Management Programming Manual424824-001
C-43
Example in C
}
if (error)
{
printf ("SSGET procedure error - %d\n", error);
send_password_response (PASSW_ERROR_RSP, NULL);
return;
}
error = validate_bind_password (&appl_name,
&passw,
&ua_osi_address,
&passw_ok);
if (error)
{
printf ("SQL Error accessing MSPWTABL row - %d\n", error);
}
if (!error &&
passw_ok)
{
send_password_response (PASSW_OK_RSP, NULL);
return;
}
else
{
send_password_response (PASSW_ERROR_RSP, NULL);
return;
}
} /* end process_ms_bind_appl */
/***************************************************************************/
/* Function: process_ms_register_appl */
/* Usage : process_ms_register_appl (req_buf) */
/* Parameters: req_buf INPUT */
/*-------------------------------------------------------------------------*/
/* Process the Register-MS request from the MS process. Extract the */
/* attributes from the request and call alter_mspwtabl_row_passw to alter */
/* the row in MSPWTABL. If all goes well, send an OK response, else send */
/* an error response. */
/* Tokens: */
/* ZMHS_MAP_APPL_NAME Required */
/* ZMHS_MAP_PASSW Required */
/* ZMHS_MAP_OLD_PASSW Required */
/***************************************************************************/
void process_ms_register_appl (char *req_buf)
{
short *req_buf_s = (short *)req_buf;
int error;
bool passw_updated;
zmhs_ddl_appl_name_def appl_name;
zmhs_ddl_passw_def passw;
zmhs_ddl_old_passw_def old_passw;
error = SSGET (req_buf_s,
(short *)&zmhs_map_appl_name,
(char *)&appl_name);
if (error)
{
printf ("SSGET procedure error - %d\n", error);
send_password_response (PASSW_ERROR_RSP, NULL);
return;
}
error = SSGET (req_buf_s,