void gcd_api_disconnect( GCD_PCB *pcb ) { pcb->api.name = "IIapi_disconnect()"; pcb->api.parm.disc.dc_genParm.gp_callback = gcd_disc_cmpl; pcb->api.parm.disc.dc_genParm.gp_closure = (PTR)pcb; pcb->api.parm.disc.dc_connHandle = pcb->data.disc.conn; IIapi_disconnect( &pcb->api.parm.disc ); return; }
static void IIdemo_disconn( II_PTR *connHandle ) { IIAPI_DISCONNPARM disconnParm; IIAPI_WAITPARM waitParm = { -1 }; printf( "IIdemo_disconn: releasing connection\n" ); disconnParm.dc_genParm.gp_callback = NULL; disconnParm.dc_genParm.gp_closure = NULL; disconnParm.dc_connHandle = *connHandle; IIapi_disconnect( &disconnParm ); while( disconnParm.dc_genParm.gp_completed == FALSE ) IIapi_wait( &waitParm ); *connHandle = NULL; return; }