summaryrefslogtreecommitdiff
path: root/lib/request.c
diff options
context:
space:
mode:
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;
+}