Lines Matching refs:cctx
116 struct cli_ctx *cctx;
120 cctx = secreq->cctx;
140 talloc_free(cctx);
145 TEVENT_FD_WRITEABLE(cctx->cfde);
148 static void sec_cmd_execute(struct cli_ctx *cctx)
153 secreq = talloc_get_type(cctx->state_ctx, struct sec_req_ctx);
155 req = sec_http_request_send(secreq, cctx->ev, secreq);
159 talloc_free(cctx);
460 static void sec_send(struct cli_ctx *cctx)
465 req = talloc_get_type(cctx->state_ctx, struct sec_req_ctx);
467 ret = sec_send_data(cctx->cfd, &req->reply);
474 talloc_free(cctx);
479 TEVENT_FD_NOT_WRITEABLE(cctx->cfde);
480 TEVENT_FD_READABLE(cctx->cfde);
481 talloc_zfree(cctx->state_ctx);
513 static void sec_recv(struct cli_ctx *cctx)
517 struct sec_ctx *sec_ctx = talloc_get_type(cctx->rctx->pvt_ctx,
525 prctx = talloc_get_type(cctx->protocol_ctx, struct sec_proto_ctx);
526 req = talloc_get_type(cctx->state_ctx, struct sec_req_ctx);
529 req = talloc_zero(cctx, struct sec_req_ctx);
533 talloc_free(cctx);
536 req->cctx = cctx;
538 cctx->state_ctx = req;
543 ret = sec_recv_data(cctx->cfd, &data);
548 talloc_free(cctx);
561 talloc_free(cctx);
570 talloc_free(cctx);
579 TEVENT_FD_NOT_READABLE(cctx->cfde);
581 sec_cmd_execute(cctx);
601 int sec_connection_setup(struct cli_ctx *cctx)
605 protocol_ctx = talloc_zero(cctx, struct sec_proto_ctx);
609 cctx->protocol_ctx = protocol_ctx;
610 cctx->cfd_handler = sec_fd_handler;