summaryrefslogtreecommitdiff
path: root/lib/examples/client-blocking.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2010-10-03 23:27:46 +0200
committerLinus Nordberg <linus@nordu.net>2010-10-03 23:27:46 +0200
commitdcfb8bca7400c5db4fafbed7aa9395e5f3277d9b (patch)
treeb27ba2c7de397236b85e5a02a6277fe786fc17ff /lib/examples/client-blocking.c
parent4d99bb55ec1368b42daccb29f0440bc166297a17 (diff)
WIP
Diffstat (limited to 'lib/examples/client-blocking.c')
-rw-r--r--lib/examples/client-blocking.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c
index a9a4f32..0e6ad39 100644
--- a/lib/examples/client-blocking.c
+++ b/lib/examples/client-blocking.c
@@ -28,10 +28,11 @@ blocking_client (const char *av1, const char *av2)
if (rs_context_create (&h, "/usr/share/freeradius/dictionary"))
return NULL;
- if (rs_conn_create (h, &conn, RS_CONN_TYPE_UDP))
- return rs_err_conn_pop (conn);
#if !defined (USE_CONFIG_FILE)
- if (rs_server_create (conn, &server, NULL))
+ if (rs_conn_create (h, &conn, NULL))
+ return rs_err_conn_pop (conn);
+ rs_conn_set_type (conn, RS_CONN_TYPE_UDP);
+ if (rs_server_create (conn, &server))
return rs_err_conn_pop (conn);
if (rs_server_set_address (server, av1, atoi (av2)))
return rs_err_conn_pop (conn);
@@ -42,7 +43,7 @@ blocking_client (const char *av1, const char *av2)
#else
if (rs_context_config_read (h, av1))
return rs_err_ctx_pop (h);
- if (rs_server_create (conn, &server, av2))
+ if (rs_conn_create (h, &conn, av2))
return rs_err_conn_pop (conn);
#endif /* USE_CONFIG_FILE */