OSI/MHS Management Programming Manual
Examples
OSI/MHS Management Programming Manual—424824-001
C-42
Example in C
 }
 else
 {
 send_password_response (PASSW_ERROR_RSP, NULL);
 return;
 }
} /* end process_ms_delete_appl */
/***************************************************************************/
/* Function: process_ms_bind_appl */
/* Usage : process_ms_bind_appl (req_buf) */
/* Parameters: req_buf INPUT */
/*-------------------------------------------------------------------------*/
/* Process the MS-Bind request from the MS process. Extract the attributes */
/* from the request and call validate_bind_password to validate the bind */
/* password and optionally the OSI address. If they are OK, send an OK */
/* response, else send an error response. */
/* Tokens: */
/* ZMHS_MAP_APPL_NAME Required */
/* ZMHS_MAP_PASSW Required */
/* ZMHS_MAP_UA_OSI_ADDRESS Optional */
/***************************************************************************/
void process_ms_bind_appl (char *req_buf)
{
 short *req_buf_s = (short *)req_buf;
 int error;
 int passw_ok;
 zmhs_ddl_appl_name_def appl_name;
 zmhs_ddl_passw_def passw;
 zmhs_ddl_ua_osi_address_def ua_osi_address;
 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,
 (short *)&zmhs_map_passw,
 (char *)&passw);
 if (error)
 {
 printf ("SSGET procedure error - %d\n", error);
 send_password_response (PASSW_ERROR_RSP, NULL);
 return;
 }
 /* If OSI address is not present, set the zlength fields to -1
 * This is used to indicate to validate_bind_password that these
 * fields are not present
 */
 error = SSGET (req_buf_s,
 (short *)&zmhs_map_ua_osi_address,
 (char *)&ua_osi_address);
 if (error == TKN_NOT_PRESENT_ERROR)
 {
 error = 0;
 ua_osi_address.zpselector.zlength = -1;
 ua_osi_address.zsselector.zlength = -1;
 ua_osi_address.ztselector.zlength = -1;
 ua_osi_address.znsap.zlength = -1;










