Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iscsi_initiator/iscsi.c
Show First 20 Lines • Show All 386 Lines • ▼ Show 20 Lines | |||||
i_setsoc(isc_session_t *sp, int fd, struct thread *td) | i_setsoc(isc_session_t *sp, int fd, struct thread *td) | ||||
{ | { | ||||
cap_rights_t rights; | cap_rights_t rights; | ||||
int error = 0; | int error = 0; | ||||
if(sp->soc != NULL) | if(sp->soc != NULL) | ||||
isc_stop_receiver(sp); | isc_stop_receiver(sp); | ||||
error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_SOCK_CLIENT), | error = getsock_cap(td, fd, cap_rights_init_one(&rights, CAP_SOCK_CLIENT), | ||||
&sp->fp, NULL, NULL); | &sp->fp, NULL, NULL); | ||||
if(error) | if(error) | ||||
return error; | return error; | ||||
sp->soc = sp->fp->f_data; | sp->soc = sp->fp->f_data; | ||||
sp->td = td; | sp->td = td; | ||||
isc_start_receiver(sp); | isc_start_receiver(sp); | ||||
return error; | return error; | ||||
▲ Show 20 Lines • Show All 476 Lines • Show Last 20 Lines |