# NMS_GR303Exit

Performs an internal NMS GR303 library clean-up procedure and exits the library.

#### Prototype

NMS_GR303_RESULT_T NMS_GR303Exit()

#### Return values

Return value | Description
NMSGR303_SUCCESS |
NMSGR303_INTERNAL_FAILURE | Internal failure. Refer to the trace log for more information.
NMSGR303_NOT_INITIALIZED | NMS GR303 library was not initialized with NMS_GR303Initialize.

#### Details

NMS_GR303Exit performs the following tasks:

- Destroys HDLC channels provisioned by the application (if they have not been destroyed) and resets the signaling mode to CAS for timeslots associated with provisioned HDLC channels.

- Flushes trace buffers, stops internal tasks, and frees memory allocated for the NMS GR303 library.

#### See also

NMS_GR303DestroyInterface, NMS_GR303StopInterface

#### Example

void Exit( void )
{
NMS_GR303_RESULT_T NmsResult;
printf("NMS_GR303Exit:\n");
NmsResult = NMS_GR303Exit();
printf ("NMS_GR303Exit: Result=%s\n",PRINT_RESULT(NmsResult));
}