OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
B-32
 local_rc = GPI_OM_FETCH_ ( desc_list[exist].value.object.object,
 OM_TRUE, /* Values returned */
 f_desc_list,
 number_of_attri,
 descriptor_list_out,
 string_buffer,
 STRING_BUFFER_LEN,
 &actual_string_len,
 &total_string_len);
 if (( local_rc == OM_RC_SUCCESS ) || ( local_rc == ZGPI_RC_WARNING ))
 {
 if ( local_rc == ZGPI_RC_WARNING )
 printf (" WARNING! number: %d \n", local_rc );
 print_attributes ( number_of_attri,
 print_data,
 descriptor_list_out,
 number_of_attri);
 } /* if */
 } /* if */
 else
 printf (" Object doesn't exist!\n");
 if ( local_rc != OM_RC_SUCCESS )
 show_gpi_status (ZGPI_ANY);
} /* print_object */
#pragma page
/**************************************************************************/
/* Function Name: print_message */
/* */
/* Arguments: root_id IN */
/* */
/* Return: Return code from the function call */
/* */
/* Description: This function prints all attributes in the message */
/* that is transfered in, under the assumption that the */
/* received message is the same as was transferred out. */
/* It uses GPI_OM_EXAMINE_ and GPI_OM_LIST_ (for the */
/* multivalued attribute) to extract values and print */
/* them using print_attributes and print_object. */
/**************************************************************************/
unsigned short print_message ( unsigned long root_id )
{
 short
 exist, /* Position of the attribute in the */
 /* descriptor list */
 counter; /* Counter for a loop */
 unsigned short
 local_rc; /* Return code from a function call */
 unsigned long
 total_number, /* Total number of attributes */
 total_number_2, /* Total number of attributes */
 actual_number, /* Returns the actual number of bytes */
 actual_number_2, /* Returns the actual number of bytes */
 actual_string_len, /* Returns the actual string length in the */
 /* buffer */
 actual_string_len_2, /* Returns the actual string length in the */
 /* buffer */










