]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove unused detach() function
authorAlan T. DeKok <aland@freeradius.org>
Thu, 16 Aug 2018 17:05:23 +0000 (13:05 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 16 Aug 2018 17:05:23 +0000 (13:05 -0400)
src/modules/proto_control/proto_control_tcp.c
src/modules/proto_control/proto_control_unix.c
src/modules/proto_dhcpv4/proto_dhcpv4_udp.c
src/modules/proto_radius/proto_radius_tcp.c
src/modules/proto_radius/proto_radius_udp.c
src/modules/proto_vmps/proto_vmps_udp.c

index 19fd89e875dec5ccbd4bdb33f5141cf0db81b470..8f75530203385cecfb33837031394c24cf03d6df 100644 (file)
@@ -535,25 +535,12 @@ static RADCLIENT *mod_client_find(UNUSED void *instance, fr_ipaddr_t const *ipad
        return client_find(NULL, ipaddr, ipproto);
 }
 
-#if 0
-static int mod_detach(void *instance)
-{
-       proto_control_tcp_t     *inst = talloc_get_type_abort(instance, proto_control_tcp_t);
-
-       if (inst->sockfd >= 0) close(inst->sockfd);
-       inst->sockfd = -1;
-
-       return 0;
-}
-#endif
-
 extern fr_app_io_t proto_control_tcp;
 fr_app_io_t proto_control_tcp = {
        .magic                  = RLM_MODULE_INIT,
        .name                   = "control_tcp",
        .config                 = tcp_listen_config,
        .inst_size              = sizeof(proto_control_tcp_t),
-//     .detach                 = mod_detach,
        .bootstrap              = mod_bootstrap,
 
        .default_message_size   = 4096,
index 3d829d652e5a4f12f250745547b255ff681df69a..1303cb6965978f71d2bf2c8bcecb9f493afa0147 100644 (file)
@@ -1227,25 +1227,12 @@ static RADCLIENT *mod_client_find(void *instance, UNUSED fr_ipaddr_t const *ipad
        return &inst->radclient;
 }
 
-#if 0
-static int mod_detach(void *instance)
-{
-       proto_control_unix_t    *inst = talloc_get_type_abort(instance, proto_control_unix_t);
-
-       if (inst->sockfd >= 0) close(inst->sockfd);
-       inst->sockfd = -1;
-
-       return 0;
-}
-#endif
-
 extern fr_app_io_t proto_control_unix;
 fr_app_io_t proto_control_unix = {
        .magic                  = RLM_MODULE_INIT,
        .name                   = "control_unix",
        .config                 = unix_listen_config,
        .inst_size              = sizeof(proto_control_unix_t),
-//     .detach                 = mod_detach,
        .bootstrap              = mod_bootstrap,
 
        .default_message_size   = 4096,
index 3f46034b7d213370676677b145ddcefa2637755a..9db7978af0cf1c0b74fb3d3106dcf0dc46a8e2cd 100644 (file)
@@ -736,25 +736,12 @@ static RADCLIENT *mod_client_find(UNUSED void *instance, fr_ipaddr_t const *ipad
        return client_find(NULL, ipaddr, ipproto);
 }
 
-#if 0
-static int mod_detach(void *instance)
-{
-       proto_dhcpv4_udp_t      *inst = talloc_get_type_abort(instance, proto_dhcpv4_udp_t);
-
-       if (inst->sockfd >= 0) close(inst->sockfd);
-       inst->sockfd = -1;
-
-       return 0;
-}
-#endif
-
 extern fr_app_io_t proto_dhcpv4_udp;
 fr_app_io_t proto_dhcpv4_udp = {
        .magic                  = RLM_MODULE_INIT,
        .name                   = "dhcpv4_udp",
        .config                 = udp_listen_config,
        .inst_size              = sizeof(proto_dhcpv4_udp_t),
-//     .detach                 = mod_detach,
        .bootstrap              = mod_bootstrap,
        .instantiate            = mod_instantiate,
 
index a87e163569684d119b36e38b42c505b9bd2f8c3c..a3e67b68fa938d939496647916c62fe0fa880f6f 100644 (file)
@@ -648,25 +648,12 @@ static RADCLIENT *mod_client_find(UNUSED void *instance, fr_ipaddr_t const *ipad
        return client_find(NULL, ipaddr, ipproto);
 }
 
-#if 0
-static int mod_detach(void *instance)
-{
-       proto_radius_tcp_t      *inst = talloc_get_type_abort(instance, proto_radius_tcp_t);
-
-       if (inst->sockfd >= 0) close(inst->sockfd);
-       inst->sockfd = -1;
-
-       return 0;
-}
-#endif
-
 extern fr_app_io_t proto_radius_tcp;
 fr_app_io_t proto_radius_tcp = {
        .magic                  = RLM_MODULE_INIT,
        .name                   = "radius_tcp",
        .config                 = tcp_listen_config,
        .inst_size              = sizeof(proto_radius_tcp_t),
-//     .detach                 = mod_detach,
        .bootstrap              = mod_bootstrap,
 
        .default_message_size   = 4096,
index 22714a329b39c151423d6062cda5fe9ae0d820af..4e45f21421728c3a6983cdefa8b6df1f4778136c 100644 (file)
@@ -561,25 +561,12 @@ static RADCLIENT *mod_client_find(void *instance, fr_ipaddr_t const *ipaddr, int
        return client_find(NULL, ipaddr, ipproto);
 }
 
-#if 0
-static int mod_detach(void *instance)
-{
-       proto_radius_udp_t      *inst = talloc_get_type_abort(instance, proto_radius_udp_t);
-
-       if (inst->sockfd >= 0) close(inst->sockfd);
-       inst->sockfd = -1;
-
-       return 0;
-}
-#endif
-
 extern fr_app_io_t proto_radius_udp;
 fr_app_io_t proto_radius_udp = {
        .magic                  = RLM_MODULE_INIT,
        .name                   = "radius_udp",
        .config                 = udp_listen_config,
        .inst_size              = sizeof(proto_radius_udp_t),
-//     .detach                 = mod_detach,
        .bootstrap              = mod_bootstrap,
 
        .default_message_size   = 4096,
index a702da112f2461fcc4a441ccea8c4dddff373663..1dd3f509ec38db6c7efc11856ab5553a3eaf6516 100644 (file)
@@ -575,25 +575,12 @@ static RADCLIENT *mod_client_find(void *instance, fr_ipaddr_t const *ipaddr, int
        return client_find(NULL, ipaddr, ipproto);
 }
 
-#if 0
-static int mod_detach(void *instance)
-{
-       proto_vmps_udp_t        *inst = talloc_get_type_abort(instance, proto_vmps_udp_t);
-
-       if (inst->sockfd >= 0) close(inst->sockfd);
-       inst->sockfd = -1;
-
-       return 0;
-}
-#endif
-
 extern fr_app_io_t proto_vmps_udp;
 fr_app_io_t proto_vmps_udp = {
        .magic                  = RLM_MODULE_INIT,
        .name                   = "vmps_udp",
        .config                 = udp_listen_config,
        .inst_size              = sizeof(proto_vmps_udp_t),
-//     .detach                 = mod_detach,
        .bootstrap              = mod_bootstrap,
        .instantiate            = mod_instantiate,