From 34747348ee53e02bb6faa6a6e26c1440e327ff60 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Mon, 14 Nov 2011 17:05:17 +1100 Subject: remove rs_packet_frpkt --- lib/examples/client-blocking.c | 5 ++--- lib/include/radsec/radsec-impl.h | 3 --- lib/packet.c | 7 ------- lib/radsec.sym | 1 - lib/tests/test-udp.c | 3 +-- 5 files changed, 3 insertions(+), 16 deletions(-) (limited to 'lib') diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c index 509e68a..2cfd617 100644 --- a/lib/examples/client-blocking.c +++ b/lib/examples/client-blocking.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -70,10 +69,10 @@ blocking_client (const char *av1, const char *av2, int use_request_object_flag) if (resp) { rs_dump_packet (resp); - if (rs_packet_frpkt (resp)->code == PW_ACCESS_ACCEPT) + 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/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h index 2df632a..da4e99c 100644 --- a/lib/include/radsec/radsec-impl.h +++ b/lib/include/radsec/radsec-impl.h @@ -125,9 +125,6 @@ struct rs_error *rs_resolv (struct evutil_addrinfo **addr, const char *hostname, const char *service); -/** Return the internal packet associated with packet \a pkt. */ -struct radius_packet *rs_packet_frpkt(struct rs_packet *pkt); - #if defined (__cplusplus) } #endif diff --git a/lib/packet.c b/lib/packet.c index 4a29b5f..86a16c3 100644 --- a/lib/packet.c +++ b/lib/packet.c @@ -197,13 +197,6 @@ rs_packet_create_authn_request (struct rs_connection *conn, return RSE_OK; } -struct radius_packet * -rs_packet_frpkt (struct rs_packet *pkt) -{ - assert (pkt); - return pkt->rpkt; -} - void rs_packet_destroy (struct rs_packet *pkt) { diff --git a/lib/radsec.sym b/lib/radsec.sym index c5890a9..5382409 100644 --- a/lib/radsec.sym +++ b/lib/radsec.sym @@ -69,7 +69,6 @@ rs_packet_code rs_packet_create rs_packet_create_authn_request rs_packet_destroy -rs_packet_frpkt rs_packet_send rs_peer_create rs_peer_set_address diff --git a/lib/tests/test-udp.c b/lib/tests/test-udp.c index e51531c..f66eebd 100644 --- a/lib/tests/test-udp.c +++ b/lib/tests/test-udp.c @@ -1,6 +1,5 @@ #include #include -#include #include "radsec/radsec.h" #include "radsec/request.h" #include "udp.h" @@ -19,7 +18,7 @@ authenticate (struct rs_connection *conn, const char *user, const char *pw) rs_request_add_reqpkt (req, msg); assert_true (rs_request_send (req, &resp) == 0); //printf ("%s\n", rs_err_msg (rs_err_conn_pop (conn), 1)); - assert_true (rs_packet_frpkt (resp)->code == PW_ACCESS_ACCEPT); + assert_true (rs_packet_code(resp) == PW_ACCESS_ACCEPT); rs_request_destroy (req); } -- cgit v1.1