WPS 2.0: Provide (Re)Association Response WPS IE to driver
[libeap.git] / radius_example / radius_example.c
index 4ff4337..fd7dbae 100644 (file)
@@ -39,12 +39,13 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
 /* Process the RADIUS frames from Authentication Server */
 static RadiusRxResult receive_auth(struct radius_msg *msg,
                                   struct radius_msg *req,
-                                  u8 *shared_secret, size_t shared_secret_len,
+                                  const u8 *shared_secret,
+                                  size_t shared_secret_len,
                                   void *data)
 {
        /* struct radius_ctx *ctx = data; */
        printf("Received RADIUS Authentication message; code=%d\n",
-              msg->hdr->code);
+              radius_msg_get_hdr(msg)->code);
 
        /* We're done for this example, so request eloop to terminate. */
        eloop_terminate();
@@ -150,6 +151,7 @@ int main(int argc, char *argv[])
 
        radius_client_deinit(ctx.radius);
        os_free(srv->shared_secret);
+       os_free(srv);
 
        eloop_destroy();
        os_program_deinit();