Skip to content

Commit cd32600

Browse files
committed
move duplicate struct to common definition
1 parent 1c19a6c commit cd32600

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

src/listen/radius/proto_radius.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,14 @@ typedef struct {
4646
///< Message-Authenticator.
4747
} proto_radius_t;
4848

49+
struct proto_radius_io_thread_s {
50+
char const *name; //!< socket name
51+
int sockfd;
52+
53+
fr_io_address_t *connection; //!< for connected sockets.
54+
55+
fr_stats_t stats; //!< statistics for this socket
56+
57+
};
58+
4959
void proto_radius_log(fr_listen_t *li, char const *name, fr_radius_decode_fail_t reason, fr_socket_t const *sock, char const *fmt, ...);

src/listen/radius/proto_radius_tcp.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@
3434

3535
extern fr_app_io_t proto_radius_tcp;
3636

37-
typedef struct {
38-
char const *name; //!< socket name
39-
int sockfd;
40-
41-
fr_io_address_t *connection; //!< for connected sockets.
42-
43-
fr_stats_t stats; //!< statistics for this socket
44-
} proto_radius_tcp_thread_t;
37+
typedef struct proto_radius_io_thread_s proto_radius_tcp_thread_t;
4538

4639
typedef struct {
4740
CONF_SECTION *cs; //!< our configuration

src/listen/radius/proto_radius_udp.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,7 @@
3535

3636
extern fr_app_io_t proto_radius_udp;
3737

38-
typedef struct {
39-
char const *name; //!< socket name
40-
int sockfd;
41-
42-
fr_io_address_t *connection; //!< for connected sockets.
43-
44-
fr_stats_t stats; //!< statistics for this socket
45-
46-
} proto_radius_udp_thread_t;
38+
typedef struct proto_radius_io_thread_s proto_radius_udp_thread_t;
4739

4840
typedef struct {
4941
CONF_SECTION *cs; //!< our configuration

0 commit comments

Comments
 (0)