git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix config str
[protos/libecoli.git]
/
lib
/
ecoli_node_str.c
diff --git
a/lib/ecoli_node_str.c
b/lib/ecoli_node_str.c
index
28c69b9
..
0100fec
100644
(file)
--- a/
lib/ecoli_node_str.c
+++ b/
lib/ecoli_node_str.c
@@
-108,7
+108,7
@@
static int ec_node_str_set_config(struct ec_node *gen_node,
const struct ec_config *value = NULL;
char *s = NULL;
const struct ec_config *value = NULL;
char *s = NULL;
- value = ec_config_get(config, "string");
+ value = ec_config_
dict_
get(config, "string");
if (value == NULL) {
errno = EINVAL;
goto fail;
if (value == NULL) {
errno = EINVAL;
goto fail;
@@
-146,6
+146,7
@@
EC_NODE_TYPE_REGISTER(ec_node_str_type);
int ec_node_str_set_str(struct ec_node *gen_node, const char *str)
{
struct ec_config *config = NULL;
int ec_node_str_set_str(struct ec_node *gen_node, const char *str)
{
struct ec_config *config = NULL;
+ int ret;
if (ec_node_check_type(gen_node, &ec_node_str_type) < 0)
goto fail;
if (ec_node_check_type(gen_node, &ec_node_str_type) < 0)
goto fail;
@@
-159,10
+160,13
@@
int ec_node_str_set_str(struct ec_node *gen_node, const char *str)
if (config == NULL)
goto fail;
if (config == NULL)
goto fail;
- if (ec_config_dict_set(config, "string", ec_config_string(str)) < 0)
+ ret = ec_config_dict_set(config, "string", ec_config_string(str));
+ if (ret < 0)
goto fail;
goto fail;
- if (ec_node_set_config(gen_node, config) < 0)
+ ret = ec_node_set_config(gen_node, config);
+ config = NULL;
+ if (ret < 0)
goto fail;
return 0;
goto fail;
return 0;