summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-06 16:44:43 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-06 16:44:43 +0100
commite5207cd80b8a522be84e3f66479663e559309ee7 (patch)
tree88d5c57c925078ec8e4ef8642b6f2cb9df98ae54 /lib
parent5c60297a1eaab7b10d6f584ba329493a41b812d0 (diff)
Replace asserts with EINVAL checks.
Diffstat (limited to 'lib')
-rw-r--r--lib/request.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/request.c b/lib/request.c
index 1d0b4ac..0d98544 100644
--- a/lib/request.c
+++ b/lib/request.c
@@ -95,19 +95,13 @@ _rs_req_packet_sent(void *user_data)
int
rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
{
- int err;
- struct rs_connection *conn;
-
- assert (request);
- assert (request->conn);
- assert (request->req_msg);
- conn = request->conn;
+ int err = 0;
+ struct rs_connection *conn = NULL;
if (!request || !request->conn || !request->req_msg || !resp_msg)
return rs_err_conn_push_fl (conn, RSE_INVAL, __FILE__, __LINE__, NULL);
-
+ conn = request->conn;
request->saved_cb = conn->callbacks;
-
conn->callbacks.connected_cb = _rs_req_connected;
conn->callbacks.disconnected_cb = _rs_req_disconnected;
conn->callbacks.received_cb = _rs_req_packet_received;