/*----------------------------------------------------------------------------- * Method: sr_close_instance(..) * Scope: Global * *----------------------------------------------------------------------------*/ void sr_close_instance(struct sr_instance* sr) { close(sr->sockfd); if(sr->logfile) { sr_dump_close(sr->logfile); } sr->hw_init = 0; } /* -- sr_close_instance -- */
static void sr_destroy_instance(struct sr_instance* sr) { /* REQUIRES */ assert(sr); if(sr->logfile) { sr_dump_close(sr->logfile); } /* fprintf(stderr,"sr_destroy_instance leaking memory\n"); */ } /* -- sr_destroy_instance -- */