summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-07-05 16:10:04 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-07-05 16:10:04 +0200
commit627c11526e57b94d466a7d7acd4fe0bf8cd2b776 (patch)
tree1a56dbaff527aeba4173fe067a5a40b785250279
parent656db09805cbff0b6af3c34f611b710116df4b82 (diff)
parentf852556e8a75eb568e551b23821a55d28c38f2cd (diff)
downloadouroboros-627c11526e57b94d466a7d7acd4fe0bf8cd2b776.tar.gz
ouroboros-627c11526e57b94d466a7d7acd4fe0bf8cd2b776.zip
Merged in dstaesse/ouroboros/be-irm-fix (pull request #155)
lib:irm: fix ap check when full path is given.
-rw-r--r--src/lib/irm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/irm.c b/src/lib/irm.c
index 8f475e38..a81fdad3 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -268,9 +268,11 @@ static int check_ap_path(char ** ap_name)
if (*ap_name == NULL || path == NULL)
return -EINVAL;
- if (!strlen(path) || strchr(*ap_name, '/') == NULL)
+ if (!strlen(path) || strchr(*ap_name, '/') != NULL) {
if ((ret = check_ap(*ap_name)) < 0)
return ret;
+ return 0;
+ }
tmp = malloc(strlen(path) + strlen(*ap_name) + 2);
if (tmp == NULL)