]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
no need for macro, just rename the struct fields
authorAlan T. DeKok <aland@freeradius.org>
Thu, 14 Sep 2023 13:27:21 +0000 (09:27 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 14 Sep 2023 13:59:22 +0000 (09:59 -0400)
src/bin/radclient.c
src/bin/radclient.h

index 9b0bfcb8617a732328d08819f9642e7f3251d38d..adc8b7c618e6f5b07ced9ecce2e3868ab320bc71 100644 (file)
@@ -62,8 +62,6 @@ typedef struct request_s request_t;   /* to shut up warnings about mschap.h */
                        fr_pair_append(&request->request_pairs, _attr); \
                } \
        } while (0)
-#define request_pairs  request_list
-#define reply_pairs    reply_list
 
 static int retries = 3;
 static fr_time_delta_t timeout = fr_time_delta_wrap((int64_t)5 * NSEC);        /* 5 seconds */
@@ -899,8 +897,8 @@ static int8_t request_cmp(void const *one, void const *two)
        rc_request_t const *a = one, *b = two;
        fr_pair_t *vp1, *vp2;
 
-       vp1 = fr_pair_find_by_da(&a->request_list, NULL, attr_coa_filter);
-       vp2 = fr_pair_find_by_da(&b->request_list, NULL, attr_coa_filter);
+       vp1 = fr_pair_find_by_da(&a->request_pairs, NULL, attr_coa_filter);
+       vp2 = fr_pair_find_by_da(&b->request_pairs, NULL, attr_coa_filter);
 
        if (!vp1) return -1;
        if (!vp2) return +1;
@@ -1365,6 +1363,7 @@ static int recv_one_packet(fr_time_delta_t wait_time)
                stats.lost++;
                goto packet_done;
        }
+       PAIR_LIST_VERIFY(&request->reply_pairs);
        fr_packet_log(&default_log, request->reply, &request->reply_pairs, true);
 
        /*
index bd941d6e6b22e7830c1de4b7b8271c86d755e294..5a0886edcf00d7c26c3837e3591fec3e1bed3e76 100644 (file)
@@ -88,8 +88,8 @@ struct rc_request {
        fr_radius_packet_t      *packet;        //!< The outgoing request.
        fr_radius_packet_t      *reply;         //!< The incoming response.
 
-       fr_pair_list_t          request_list;
-       fr_pair_list_t          reply_list;
+       fr_pair_list_t          request_pairs;
+       fr_pair_list_t          reply_pairs;
 
        fr_pair_list_t          filter;         //!< If the reply passes the filter, then the request passes.
        fr_radius_packet_code_t filter_code;    //!< Expected code of the response packet.