projects
/
libradsec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
823ea9b
)
Order functions properly in conn.c.
author
Linus Nordberg
<linus@nordberg.se>
Thu, 24 Jan 2013 16:22:14 +0000
(17:22 +0100)
committer
Linus Nordberg
<linus@nordberg.se>
Thu, 24 Jan 2013 16:22:14 +0000
(17:22 +0100)
lib/conn.c
patch
|
blob
|
history
lib/conn.h
patch
|
blob
|
history
diff --git
a/lib/conn.c
b/lib/conn.c
index
09a1ac0
..
64c2344
100644
(file)
--- a/
lib/conn.c
+++ b/
lib/conn.c
@@
-43,6
+43,25
@@
conn_user_dispatch_p (const struct rs_connection *conn)
conn->callbacks.sent_cb);
}
conn->callbacks.sent_cb);
}
+
+int
+conn_activate_timeout (struct rs_connection *conn)
+{
+ assert (conn);
+ assert (conn->tev);
+ assert (conn->evb);
+ if (conn->timeout.tv_sec || conn->timeout.tv_usec)
+ {
+ rs_debug (("%s: activating timer: %d.%d\n", __func__,
+ conn->timeout.tv_sec, conn->timeout.tv_usec));
+ if (evtimer_add (conn->tev, &conn->timeout))
+ return rs_err_conn_push_fl (conn, RSE_EVENT, __FILE__, __LINE__,
+ "evtimer_add: %d", errno);
+ }
+ return RSE_OK;
+}
+
+/* Public functions. */
int
rs_conn_create (struct rs_context *ctx,
struct rs_connection **conn,
int
rs_conn_create (struct rs_context *ctx,
struct rs_connection **conn,
@@
-290,20
+309,3
@@
rs_conn_set_timeout(struct rs_connection *conn, struct timeval *tv)
assert (tv);
conn->timeout = *tv;
}
assert (tv);
conn->timeout = *tv;
}
-
-int
-conn_activate_timeout (struct rs_connection *conn)
-{
- assert (conn);
- assert (conn->tev);
- assert (conn->evb);
- if (conn->timeout.tv_sec || conn->timeout.tv_usec)
- {
- rs_debug (("%s: activating timer: %d.%d\n", __func__,
- conn->timeout.tv_sec, conn->timeout.tv_usec));
- if (evtimer_add (conn->tev, &conn->timeout))
- return rs_err_conn_push_fl (conn, RSE_EVENT, __FILE__, __LINE__,
- "evtimer_add: %d", errno);
- }
- return RSE_OK;
-}
diff --git
a/lib/conn.h
b/lib/conn.h
index
f58cc53
..
cf15b80
100644
(file)
--- a/
lib/conn.h
+++ b/
lib/conn.h
@@
-1,6
+1,6
@@
/* Copyright 2011 NORDUnet A/S. All rights reserved.
See LICENSE for licensing information. */
/* Copyright 2011 NORDUnet A/S. All rights reserved.
See LICENSE for licensing information. */
-int conn_user_dispatch_p (const struct rs_connection *conn);
int conn_close (struct rs_connection **connp);
int conn_close (struct rs_connection **connp);
+int conn_user_dispatch_p (const struct rs_connection *conn);
int conn_activate_timeout (struct rs_connection *conn);
int conn_activate_timeout (struct rs_connection *conn);