Lines Matching refs:sp

190 	session_t	*sp;  in ses_close()  local
198 if ((sp = curr_ses()) == NULL) { in ses_close()
204 if (sp->state == DCS_SES_END) { in ses_close()
220 snd_status = rdr_snd_msg(sp->fd, &req_hdr, &req_data, DCS_SND_TIMEOUT); in ses_close()
237 sp->state = DCS_SES_END; in ses_close()
542 session_t *sp; in ses_handler() local
565 if ((sp = curr_ses()) == NULL) { in ses_handler()
571 memset(sp, 0, sizeof (session_t)); in ses_handler()
572 sp->state = DCS_CONNECTED; in ses_handler()
573 sp->random_resp = lrand48(); in ses_handler()
574 sp->fd = (int)arg; in ses_handler()
575 sp->id = curr_ses_id(); in ses_handler()
595 dcs_state_str[sp->state]); in ses_handler()
597 if (sp->state == DCS_SES_END) { in ses_handler()
604 rcv_status = rdr_rcv_msg(sp->fd, &op_hdr, &op_data, in ses_handler()
629 if (sp->state != DCS_CONNECTED) { in ses_handler()
659 (void) rdr_close(sp->fd); in ses_handler()
682 session_t *sp; in abort_handler() local
688 if ((sp = curr_ses()) == NULL) { in abort_handler()
702 op_hdr.message_opcode = sp->curr_msg.hdr->message_opcode; in abort_handler()
711 (void) rdr_snd_msg(sp->fd, &op_hdr, &op_data, DCS_SND_TIMEOUT); in abort_handler()
716 rdr_cleanup_params(op_hdr.message_opcode, sp->curr_msg.params); in abort_handler()
717 (void) rdr_close(sp->fd); in abort_handler()
766 session_t *sp; in ses_alloc() local
780 sp = (session_t *)malloc(sizeof (session_t)); in ses_alloc()
782 if (!sp) { in ses_alloc()
789 thr_err = thr_setspecific(ses_key, sp); in ses_alloc()
796 ses = sp; in ses_alloc()
812 session_t *sp; in ses_free() local
817 if ((sp = curr_ses()) == NULL) { in ses_free()
822 if (sp) { in ses_free()
823 (void) free((void *)sp); in ses_free()