summaryrefslogtreecommitdiff
path: root/lib/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/request.c')
-rw-r--r--lib/request.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/request.c b/lib/request.c
index 3a8b6dd..b75dd92 100644
--- a/lib/request.c
+++ b/lib/request.c
@@ -1,4 +1,4 @@
-/* Copyright 2010-2011 NORDUnet A/S. All rights reserved.
+/* Copyright 2010-2013 NORDUnet A/S. All rights reserved.
See LICENSE for licensing information. */
#if defined HAVE_CONFIG_H
@@ -30,7 +30,7 @@
int
rs_request_create (struct rs_connection *conn, struct rs_request **req_out)
{
- struct rs_request *req = rs_malloc (conn->ctx, sizeof(*req));
+ struct rs_request *req = rs_malloc (conn->base_.ctx, sizeof(*req));
assert (req_out);
if (!req)
return rs_err_conn_push_fl (conn, RSE_NOMEM, __FILE__, __LINE__, NULL);
@@ -41,7 +41,7 @@ rs_request_create (struct rs_connection *conn, struct rs_request **req_out)
}
void
-rs_request_add_reqpkt (struct rs_request *req, struct rs_packet *req_msg)
+rs_request_add_reqmsg (struct rs_request *req, struct rs_message *req_msg)
{
assert (req);
req->req_msg = req_msg;
@@ -59,7 +59,7 @@ rs_request_create_authn (struct rs_connection *conn,
if (rs_request_create (conn, &req))
return -1;
- if (rs_packet_create_authn_request (conn, &req->req_msg, user_name, user_pw))
+ if (rs_message_create_authn_request (conn, &req->req_msg, user_name, user_pw))
return -1;
if (req_out)
@@ -72,11 +72,11 @@ rs_request_destroy (struct rs_request *request)
{
assert (request);
assert (request->conn);
- assert (request->conn->ctx);
+ assert (request->conn->base_.ctx);
if (request->req_msg)
- rs_packet_destroy (request->req_msg);
- rs_free (request->conn->ctx, request);
+ rs_message_destroy (request->req_msg);
+ rs_free (request->conn->base_.ctx, request);
}
static void
@@ -88,7 +88,7 @@ _rand_rt (struct timeval *res, uint32_t rtprev, uint32_t factor)
}
int
-rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
+rs_request_send (struct rs_request *request, struct rs_message **resp_msg)
{
int r = 0;
struct rs_connection *conn = NULL;
@@ -102,7 +102,7 @@ rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
if (!request || !request->conn || !request->req_msg || !resp_msg)
return rs_err_conn_push_fl (conn, RSE_INVAL, __FILE__, __LINE__, NULL);
conn = request->conn;
- assert (!conn_user_dispatch_p (conn)); /* This function is high level. */
+ assert (!conn_user_dispatch_p (conn)); /* This function is high level. */
gettimeofday (&end, NULL);
end.tv_sec += MRD;
@@ -111,12 +111,12 @@ rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
{
rs_conn_set_timeout (conn, &rt);
- r = rs_packet_send (request->req_msg, NULL);
+ r = rs_message_send (request->req_msg);
if (r == RSE_OK)
{
- r = rs_conn_receive_packet (request->conn,
- request->req_msg,
- resp_msg);
+ r = rs_conn_receive_message (request->conn,
+ request->req_msg,
+ resp_msg);
if (r == RSE_OK)
break; /* Success. */
@@ -148,7 +148,7 @@ rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
return r;
}
-struct rs_packet *
+struct rs_message *
rs_request_get_reqmsg (const struct rs_request *request)
{
assert (request);