summaryrefslogtreecommitdiff
path: root/lib/request.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-14 00:26:05 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-14 00:26:05 +0100
commit751c36d64b78be64fd41c4c5a6ba8ae393bb91f8 (patch)
tree4ee1124eb2507587d5841eeadf8fe78c66542d91 /lib/request.c
parent1addbfaaa594aa34daf5a38ce0038ec74e878d7c (diff)
Add rs_request_get_reqmsg() and update documentation.
Diffstat (limited to 'lib/request.c')
-rw-r--r--lib/request.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/request.c b/lib/request.c
index c74ed92..8d6a45e 100644
--- a/lib/request.c
+++ b/lib/request.c
@@ -53,15 +53,17 @@ rs_request_create_authn (struct rs_connection *conn,
const char *user_name,
const char *user_pw)
{
- struct rs_request *req;
+ struct rs_request *req = NULL;
assert (req_out);
+
if (rs_request_create (conn, &req))
return -1;
if (rs_packet_create_authn_request (conn, &req->req_msg, user_name, user_pw))
return -1;
- *req_out = req;
+ if (req_out)
+ *req_out = req;
return RSE_OK;
}
@@ -142,3 +144,10 @@ rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
rs_debug (("%s: returning %d\n", __func__, r));
return r;
}
+
+struct rs_packet *
+rs_request_get_reqmsg (const struct rs_request *request)
+{
+ assert (request);
+ return request->req_msg;
+}