From 63c4a90eb76a030e5af2209b26f7e95b3bb7b531 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 25 Jan 2019 19:04:15 +0100 Subject: [PATCH] Remove unused PROTO_AGENT code --- .../LAYER2/PROTO_AGENT/proto_agent_net_comm.c | 40 ------------------- .../LAYER2/PROTO_AGENT/proto_agent_net_comm.h | 4 -- 2 files changed, 44 deletions(-) diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.c index 99b1a0b79b..5788bd0830 100644 --- a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.c +++ b/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.c @@ -41,46 +41,6 @@ proto_agent_channel_t *proto_channel[NUM_MAX_ENB][ENB_AGENT_MAX]; proto_agent_channel_instance_t channel_instance; int proto_agent_channel_id = 0; -int proto_agent_msg_send(mod_id_t mod_id, proto_agent_id_t agent_id, void *data, int size, int priority) { - /*Check if agent id is valid*/ - if (agent_id >= ENB_AGENT_MAX || agent_id < 0) { - goto error; - } - proto_agent_channel_t *channel; - channel = proto_channel[mod_id][agent_id]; - - /*Check if agent has a channel registered*/ - if (channel == NULL) { - goto error; - } - - return channel->msg_send(data, size, priority, channel->channel_info); - - error: - LOG_E(PROTO_AGENT, "No channel registered for agent with id %d\n", agent_id); - return -1; -} - -int proto_agent_msg_recv(mod_id_t mod_id, proto_agent_id_t agent_id, void **data, int *size, int *priority) { - /*Check if agent id is valid*/ - if (agent_id >= ENB_AGENT_MAX || agent_id < 0) { - goto error; - } - proto_agent_channel_t *channel; - channel = proto_channel[mod_id][agent_id]; - - /*Check if agent has a channel registered*/ - if (channel == NULL) { - goto error; - } - - return channel->msg_recv(data, size, priority, channel->channel_info); - - error: - LOG_E(PROTO_AGENT, "No channel registered for agent with id %d\n", agent_id); - return -1; -} - int proto_agent_register_channel(mod_id_t mod_id, proto_agent_channel_t *channel, proto_agent_id_t agent_id) { int i; diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.h b/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.h index 6647de6e1b..c88ba35b13 100644 --- a/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.h +++ b/openair2/LAYER2/PROTO_AGENT/proto_agent_net_comm.h @@ -59,10 +59,6 @@ typedef struct proto_agent_channel_instance_s{ RB_HEAD(proto_agent_channel_map, proto_agent_channel_s) proto_agent_head; } proto_agent_channel_instance_t; -/*Send and receive messages using the channel registered for a specific agent*/ -int proto_agent_msg_send(mod_id_t mod_id, proto_agent_id_t agent_id, void *data, int size, int priority); - -int proto_agent_msg_recv(mod_id_t mod_id, proto_agent_id_t agent_id, void **data, int *size, int *priority); /*Register a channel to an agent. Use ENB_AGENT_MAX to register the *same channel to all agents*/