From: Arran Cudbard-Bell Date: Tue, 25 Apr 2017 19:29:16 +0000 (-0400) Subject: s/event_list_alloc/event_list_create/ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0957d81e7d9addbfdb1b55d2b4525cb8c2edc36;p=thirdparty%2Ffreeradius-server.git s/event_list_alloc/event_list_create/ --- diff --git a/src/include/event.h b/src/include/event.h index 66905ebc6ee..3929839ddc9 100644 --- a/src/include/event.h +++ b/src/include/event.h @@ -58,7 +58,7 @@ typedef void (*fr_event_callback_t)(fr_event_list_t *el, struct timeval *now, vo * Called before calling kqueue to put the thread in a sleeping state. * * @param[in] now The current time. - * @param[in] ctx User ctx passed to #fr_event_list_create. + * @param[in] ctx User ctx passed to #fr_event_list_alloc. */ typedef int (*fr_event_status_t)(void *ctx, struct timeval *now); @@ -106,7 +106,7 @@ void fr_event_loop_exit(fr_event_list_t *el, int code); bool fr_event_loop_exiting(fr_event_list_t *el); int fr_event_loop(fr_event_list_t *el); -fr_event_list_t *fr_event_list_create(TALLOC_CTX *ctx, fr_event_status_t status, void *status_ctx); +fr_event_list_t *fr_event_list_alloc(TALLOC_CTX *ctx, fr_event_status_t status, void *status_ctx); #ifdef __cplusplus } diff --git a/src/lib/io/network.c b/src/lib/io/network.c index 7dd761dfd87..5bb82596449 100644 --- a/src/lib/io/network.c +++ b/src/lib/io/network.c @@ -535,7 +535,7 @@ fr_network_t *fr_network_create(TALLOC_CTX *ctx, fr_log_t *logger, uint32_t num_ return NULL; } - nr->el = fr_event_list_create(nr, fr_network_idle, nr); + nr->el = fr_event_list_alloc(nr, fr_network_idle, nr); if (!nr->el) { fr_strerror_printf("Failed creating event list: %s", fr_strerror()); talloc_free(nr); diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index 7d5b1393f00..b8fc7e0d585 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -992,7 +992,7 @@ nomem: worker->message_set_size = 1024; worker->ring_buffer_size = (1 << 16); - worker->el = fr_event_list_create(worker, fr_worker_idle, worker); + worker->el = fr_event_list_alloc(worker, fr_worker_idle, worker); if (!worker->el) { fr_strerror_printf("Failed creating event list: %s", fr_strerror()); talloc_free(worker); diff --git a/src/lib/util/event.c b/src/lib/util/event.c index d579fe73b5a..cf0f05493f1 100644 --- a/src/lib/util/event.c +++ b/src/lib/util/event.c @@ -849,7 +849,7 @@ static int _event_list_free(fr_event_list_t *el) * - A pointer to a new event list on success (free with talloc_free). * - NULL on error. */ -fr_event_list_t *fr_event_list_create(TALLOC_CTX *ctx, fr_event_status_t status, void *status_ctx) +fr_event_list_t *fr_event_list_alloc(TALLOC_CTX *ctx, fr_event_status_t status, void *status_ctx) { fr_event_list_t *el; struct kevent kev; @@ -937,7 +937,7 @@ int main(int argc, char **argv) struct timeval now, when; fr_event_list_t *el; - el = fr_event_list_create(NULL, NULL); + el = fr_event_list_alloc(NULL, NULL); if (!el) exit(1); memset(&rand_pool, 0, sizeof(rand_pool)); diff --git a/src/main/process.c b/src/main/process.c index c35ead01c44..a2a1aa4b69a 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -5214,7 +5214,7 @@ static void event_signal_handler(UNUSED fr_event_list_t *xel, */ int radius_event_init(TALLOC_CTX *ctx) { - el = fr_event_list_create(ctx, event_status, NULL); + el = fr_event_list_alloc(ctx, event_status, NULL); if (!el) return 0; #ifdef HAVE_SYSTEMD_WATCHDOG diff --git a/src/main/radsniff.c b/src/main/radsniff.c index 778689e31ef..fbd482e4935 100644 --- a/src/main/radsniff.c +++ b/src/main/radsniff.c @@ -2787,7 +2787,7 @@ int main(int argc, char *argv[]) char *buff; - events = fr_event_list_create(conf, _rs_event_status, NULL); + events = fr_event_list_alloc(conf, _rs_event_status, NULL); if (!events) { ERROR(); goto finish; diff --git a/src/main/threads.c b/src/main/threads.c index eb9ba2cd42e..129cbe55ee4 100644 --- a/src/main/threads.c +++ b/src/main/threads.c @@ -455,7 +455,7 @@ static void *thread_handler(void *arg) ctx = talloc_init("thread"); - el = fr_event_list_create(ctx, NULL, NULL); + el = fr_event_list_alloc(ctx, NULL, NULL); rad_assert(el != NULL); local_backlog = fr_heap_create(timestamp_cmp, offsetof(REQUEST, heap_id)); diff --git a/src/main/unit_test_module.c b/src/main/unit_test_module.c index b12ec9940c0..e1009992620 100644 --- a/src/main/unit_test_module.c +++ b/src/main/unit_test_module.c @@ -882,7 +882,7 @@ int main(int argc, char *argv[]) /* * Create a dummy event list */ - el = fr_event_list_create(NULL, NULL, NULL); + el = fr_event_list_alloc(NULL, NULL, NULL); rad_assert(el != NULL); /* diff --git a/src/modules/proto_bfd/proto_bfd.c b/src/modules/proto_bfd/proto_bfd.c index 50324de443f..1ede60dc84e 100644 --- a/src/modules/proto_bfd/proto_bfd.c +++ b/src/modules/proto_bfd/proto_bfd.c @@ -322,7 +322,7 @@ static int bfd_pthread_create(bfd_state_t *session) return 0; } - session->el = fr_event_list_create(session, NULL, NULL); + session->el = fr_event_list_alloc(session, NULL, NULL); if (!session->el) { ERROR("Failed creating event list"); close_pipes: