Exemplo n.º 1
0
static int
sb_rdahead_close( Sockbuf_IO_Desc *sbiod )
{
	assert( sbiod != NULL );

	/* Just erase the buffer */
	ber_pvt_sb_buf_destroy((Sockbuf_Buf *)sbiod->sbiod_pvt);
	return 0;
}
Exemplo n.º 2
0
static int
sb_sasl_generic_remove( Sockbuf_IO_Desc *sbiod )
{
	struct sb_sasl_generic_data	*p;

	assert( sbiod != NULL );

	p = (struct sb_sasl_generic_data *)sbiod->sbiod_pvt;

	p->ops->fini(p);

	ber_pvt_sb_buf_destroy( &p->sec_buf_in );
	ber_pvt_sb_buf_destroy( &p->buf_in );
	ber_pvt_sb_buf_destroy( &p->buf_out );
	LBER_FREE( p );
	sbiod->sbiod_pvt = NULL;
	return 0;
}
Exemplo n.º 3
0
static int
sb_rdahead_remove( Sockbuf_IO_Desc *sbiod )
{
	Sockbuf_Buf		*p;

	assert( sbiod != NULL );

	p = (Sockbuf_Buf *)sbiod->sbiod_pvt;

	if ( p->buf_ptr != p->buf_end ) return -1;

	ber_pvt_sb_buf_destroy( (Sockbuf_Buf *)(sbiod->sbiod_pvt) );
	LBER_FREE( sbiod->sbiod_pvt );
	sbiod->sbiod_pvt = NULL;

	return 0;
}