Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

int HAMLIB_API rig_cleanup ( RIG rig )

release a rig handle and free associated memory

rigThe RIG handle of the radio to be closed

Releases a rig struct which port has eventualy been closed already with rig_close().

RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_init(), rig_close()

Definition at line 689 of file rig.c.

References caps, rig_state::comm_state, rig_close(), rig_debug(), RIG_DEBUG_VERBOSE, RIG_EINVAL, RIG_OK, and state.

      rig_debug(RIG_DEBUG_VERBOSE,"rig:rig_cleanup called \n");

      if (!rig || !rig->caps)
            return -RIG_EINVAL;

       * check if they forgot to close the rig
      if (rig->state.comm_state)

       * basically free up the priv struct 
      if (rig->caps->rig_cleanup)


      return RIG_OK;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index