diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-10-26 09:56:31 +0000 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-10-26 09:56:31 +0000 |
commit | cc64e52dee3559128293a17a669e94acb48f9309 (patch) | |
tree | e4ef544c225e3b118c8a73d868dccaa073b55f11 /src/irmd/registry.c | |
parent | 0fd97235ecf670f1fc6db2723c530934b5376458 (diff) | |
parent | f0646875d0bc941e339d305d0c68b13543cd6f2a (diff) | |
download | ouroboros-cc64e52dee3559128293a17a669e94acb48f9309.tar.gz ouroboros-cc64e52dee3559128293a17a669e94acb48f9309.zip |
Merged in sandervrijders/ouroboros/be-directory (pull request #280)
lib, irmd, ipcpd: Add name querying to IPCPs
Diffstat (limited to 'src/irmd/registry.c')
-rw-r--r-- | src/irmd/registry.c | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/src/irmd/registry.c b/src/irmd/registry.c index 9442f3db..07ec370c 100644 --- a/src/irmd/registry.c +++ b/src/irmd/registry.c @@ -20,15 +20,16 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "registry.h" -#include "utils.h" - #define OUROBOROS_PREFIX "registry" +#include <ouroboros/config.h> #include <ouroboros/errno.h> #include <ouroboros/logs.h> #include <ouroboros/irm_config.h> +#include "registry.h" +#include "utils.h" + #include <stdlib.h> #include <stdbool.h> #include <string.h> @@ -405,44 +406,6 @@ void registry_del_api(struct list_head * registry, return; } -char * registry_get_dif_for_dst(struct list_head * registry, - char * dst_name) -{ - struct list_head * pos = NULL; - struct reg_entry * re = - registry_get_entry(registry, dst_name); - - if (re != NULL) { /* local AP */ - list_for_each(pos, &re->difs) { - struct reg_dif * rd = - list_entry(pos, struct reg_dif, next); - if (rd->type == IPCP_LOCAL) - return rd->dif_name; - } - - list_for_each(pos, &re->difs) { - struct reg_dif * rd = - list_entry(pos, struct reg_dif, next); - if (rd->type == IPCP_NORMAL) - return rd->dif_name; - } - - list_for_each(pos, &re->difs) { - struct reg_dif * rd = - list_entry(pos, struct reg_dif, next); - if (rd->type == IPCP_SHIM_UDP) - return rd->dif_name; - } - - LOG_DBG("Could not find DIF for %s.", dst_name); - - return NULL; - } else { - LOG_DBG("No local ap %s found.", dst_name); - return NULL; - } -} - int registry_add_name_to_dif(struct list_head * registry, char * name, char * dif_name, |