OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
B-16
 descriptor_list,
 descriptor_count);
 } /* if */
 } /* if */
 return (local_rc);
} /* build_and_insert_trace_object */
#pragma page
/**************************************************************************/
/* Function Name: build_and_insert_mtsid_object */
/* */
/* Arguments: root_id IN */
/* */
/* Return: Return code from the function call */
/* */
/* Description: This function creates the mh_c_mts_identifier */
/* with the initial value parameter set to FALSE. The */
/* function then inserts all the required attributes */
/* into the object. It then inserts the object into */
/* the root object. */
/**************************************************************************/
unsigned short build_and_insert_mtsid_object (unsigned long root_id)
{
 unsigned short
 local_rc; /* Return code from the function call */
 unsigned long
 descriptor_count = 2, /* Count of the elements */
 local_object; /* Local object identifier */
 /********************************************************************/
 /* NOTE: The values below are hardcoded. We recommend using the */
 /* values passed back in the environment object returned from */
 /* the GPI_OPEN_ call. */
 /********************************************************************/
 OM_descriptor
 descriptor_list[] =
 {
 MH_T_ADMD_NAME, OM_S_PRINTABLE_STRING,{ 11 , "POSTMASTER1" },
 MH_T_COUNTRY_NAME, OM_S_PRINTABLE_STRING,{ 2 , "US" }
 };
 printf (" Create the object\n");
 local_rc = GPI_OM_CREATE_ ( MH_C_MTS_IDENTIFIER,
 OM_FALSE, /* Without defined initial */
 /* values */
 &local_object,
 root_id, /* Root object identifier */
 ); /* Session not necessary */
 if (( local_rc == OM_RC_SUCCESS ) || ( local_rc == ZGPI_RC_WARNING ))
 {
 if ( local_rc == ZGPI_RC_WARNING )
 printf (" WARNING! number: %d \n", local_rc );
 printf (" Insert all required attributes\n");
 local_rc = GPI_OM_INSERT_ ( local_object,
 IGNORED_FOR_SINGLE_VALUED_ATT,










