// Terminates connection and free memory func (g *GSM) Terminate() (err error) { // terminate connection e := C.GSM_TerminateConnection(g.sm) if e != ERR_NONE { err = errors.New(errorString(int(e))) } // free up used memory C.GSM_FreeStateMachine(g.sm) return }
func (sm *StateMachine) Disconnect() error { if e := C.GSM_TerminateConnection(sm.g); e != C.ERR_NONE { return Error{"TerminateConnection", e} } return nil }