diff options
| author | Linus Nordberg <linus@nordberg.se> | 2012-04-27 17:00:17 +0200 | 
|---|---|---|
| committer | Linus Nordberg <linus@nordberg.se> | 2012-04-27 17:00:17 +0200 | 
| commit | 4b0ff99282a91bba93eec9db37831be73b8134e4 (patch) | |
| tree | 087509c14291f207260d350c9fabf07c665a4f25 /lib/examples | |
| parent | c562df4b073a288862dd3c4ceaba7d6439f33b45 (diff) | |
| parent | efb18a601811888127be69499cf10891aa3a4c37 (diff) | |
Merge libradsec-new-client.
Diffstat (limited to 'lib/examples')
| -rw-r--r-- | lib/examples/client-blocking.c | 10 | ||||
| -rw-r--r-- | lib/examples/client.conf | 2 | 
2 files changed, 3 insertions, 9 deletions
| diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c index f26cd6c..7d3869a 100644 --- a/lib/examples/client-blocking.c +++ b/lib/examples/client-blocking.c @@ -6,8 +6,8 @@  #include <stdlib.h>  #include <assert.h>  #include <event2/event.h> -#include <freeradius/libradius.h>  #include <radsec/radsec.h> +#include <radsec/radsec-impl.h>  #include <radsec/request.h>  #include "err.h"  #include "debug.h"		/* For rs_dump_packet().  */ @@ -37,8 +37,6 @@ blocking_client (const char *config_fn, const char *configuration,    {      struct rs_peer *server; -    if (rs_context_init_freeradius_dict (h, "/usr/share/freeradius/dictionary")) -      goto cleanup;      if (rs_conn_create (h, &conn, NULL))        goto cleanup;      rs_conn_set_type (conn, RS_CONN_TYPE_UDP); @@ -54,8 +52,6 @@ blocking_client (const char *config_fn, const char *configuration,  #else  /* defined (USE_CONFIG_FILE) */    if (rs_context_read_config (h, config_fn))      goto cleanup; -  if (rs_context_init_freeradius_dict (h, NULL)) -    goto cleanup;    if (rs_conn_create (h, &conn, configuration))      goto cleanup;  #endif	/* defined (USE_CONFIG_FILE) */ @@ -80,10 +76,10 @@ blocking_client (const char *config_fn, const char *configuration,    if (resp)      {        rs_dump_packet (resp); -      if (rs_packet_frpkt (resp)->code == PW_AUTHENTICATION_ACK) +      if (rs_packet_code (resp) == PW_ACCESS_ACCEPT)  	printf ("Good auth.\n");        else -	printf ("Bad auth: %d\n", rs_packet_frpkt (resp)->code); +	printf ("Bad auth: %d\n", rs_packet_code (resp));      }    else      fprintf (stderr, "%s: no response\n", __func__); diff --git a/lib/examples/client.conf b/lib/examples/client.conf index cedd259..bf57434 100644 --- a/lib/examples/client.conf +++ b/lib/examples/client.conf @@ -1,5 +1,3 @@ -dictionary = "/home/linus/usr/moonshot/share/freeradius/dictionary" -  realm blocking-udp {      type = "UDP"      timeout = 2 | 
