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

rig The 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 660 of file rig.c.

References rig::caps, rig_state::comm_state, rig_caps::rig_cleanup, rig_close(), and rig::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;

Generated by  Doxygen 1.6.0   Back to index