diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2011-07-01 22:30:25 -0500 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2011-07-01 22:30:25 -0500 |
commit | c1c30bf914e2fe059225f379cce069c530207b25 (patch) | |
tree | ddee093f10b3b80cbf68d83c7cb7bbaba93da27b /usr | |
parent | 8f133f7c2d65a8398a95cd15de14f1586cc91d86 (diff) | |
download | open-iscsi-c1c30bf914e2fe059225f379cce069c530207b25.tar.gz |
iscsi tools: revert commit c440cbe7ba2464f8baadedb55b00754c36773c2c
This reverts:
commit c440cbe7ba2464f8baadedb55b00754c36773c2c
Keep startup mode in sync when specified in config file
The normal case is for there to be both the node and conn
startup values in a rec. This is how iscsiadm writes it
out by default. The patch added a memory leak due to the
assumption that there would only be one. Also if they are both
present then the patch ends up not doing anything.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/idbm.c | 25 |
1 files changed, 1 insertions, 24 deletions
@@ -598,8 +598,6 @@ void idbm_recinfo_config(recinfo_t *info, FILE *f) char name[NAME_MAXVAL]; char value[VALUE_MAXVAL]; char *line, *nl, buffer[2048]; - char *node_startup_value = NULL; - char *conn_startup_value = NULL; int line_number = 0; int c = 0, i; @@ -658,29 +656,8 @@ void idbm_recinfo_config(recinfo_t *info, FILE *f) } *(value+i) = 0; - if (!strcmp(name, "node.startup")) { - node_startup_value = strdup(value); - } - if (!strcmp(name, "node.conn[0].startup")) { - conn_startup_value = strdup(value); - } - (void)idbm_rec_update_param(info, name, value, line_number); + idbm_rec_update_param(info, name, value, line_number); } while (line); - /* - * Compat hack: - * Keep node.startup and node.conn[0].startup in sync even - * if only one of those has been specified in the config file. - */ - if (node_startup_value && !conn_startup_value) { - (void)idbm_rec_update_param(info, "node.conn[0].startup", - node_startup_value, 0); - free(node_startup_value); - } - if (conn_startup_value && !node_startup_value) { - (void)idbm_rec_update_param(info, "node.startup", - conn_startup_value, 0); - free(conn_startup_value); - } } /* |