#include "debug.h" /* For rs_dump_packet(). */
#define SECRET "sikrit"
-#define USER_NAME "molgan"
+#define USER_NAME "molgan@PROJECT-MOONSHOT.ORG"
#define USER_PW "password"
struct rs_error *
struct rs_connection *conn = NULL;
struct rs_request *request = NULL;
struct rs_packet *req = NULL, *resp = NULL;
+ struct rs_error *err = NULL;
if (rs_context_create (&h, "/usr/share/freeradius/dictionary"))
return NULL;
fprintf (stderr, "%s: no response\n", __func__);
cleanup:
- if (resp)
- rs_packet_destroy (resp);
- if (req)
- rs_packet_destroy (req);
- if (conn)
- rs_conn_destroy (conn);
+ err = rs_err_conn_pop (conn);
if (request)
rs_request_destroy (request);
+ if (conn)
+ rs_conn_destroy (conn);
if (h)
rs_context_destroy (h);
- return rs_err_conn_pop (conn);
+ return err;
}
int