diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-07-12 20:26:17 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-07-12 20:28:34 +0200 |
commit | cb0a9d58a38d2fe163eb61d350f403a47842cdca (patch) | |
tree | 324e054cf8839f55407fa1090e3db5343d3117b3 /src/libhydra/plugins/attr_sql | |
parent | 5047fe7ad3e41b5e7f7e3a7aabca81a7be4a37aa (diff) | |
download | strongswan-cb0a9d58a38d2fe163eb61d350f403a47842cdca.tar.bz2 strongswan-cb0a9d58a38d2fe163eb61d350f403a47842cdca.tar.xz |
output identities correctly
Diffstat (limited to 'src/libhydra/plugins/attr_sql')
-rw-r--r-- | src/libhydra/plugins/attr_sql/pool_attributes.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/libhydra/plugins/attr_sql/pool_attributes.c b/src/libhydra/plugins/attr_sql/pool_attributes.c index 52efc6310..19505c6aa 100644 --- a/src/libhydra/plugins/attr_sql/pool_attributes.c +++ b/src/libhydra/plugins/attr_sql/pool_attributes.c @@ -339,7 +339,9 @@ void add_attr(char *name, char *pool, char *identity, if (identity) { - identification_t *id = identification_create_from_string(identity); + identification_t *id; + + id = identification_create_from_string(identity); identity_id = get_identity(id); id->destroy(id); if (identity_id == 0) @@ -347,7 +349,7 @@ void add_attr(char *name, char *pool, char *identity, exit(EXIT_FAILURE); } snprintf(id_pool_str, sizeof(id_pool_str), - " for '%Y' in pool '%s'", identity, pool); + " for '%s' in pool '%s'", identity, pool); } else { @@ -407,7 +409,9 @@ void del_attr(char *name, char *pool, char *identity, if (identity) { - identification_t *id = identification_create_from_string(identity); + identification_t *id; + + id = identification_create_from_string(identity); identity_id = get_identity(id); id->destroy(id); if (identity_id == 0) @@ -415,7 +419,7 @@ void del_attr(char *name, char *pool, char *identity, exit(EXIT_FAILURE); } snprintf(id_pool_str, sizeof(id_pool_str), - " for '%Y' in pool '%s'", identity, pool); + " for '%s' in pool '%s'", identity, pool); } else { @@ -605,17 +609,17 @@ void status_attr(bool hexout) } printf("%5d %-20s ",type, type_name); - printf(" %-15.15s ", (pool_name ? pool_name : "")); + printf(" %-10s ", (pool_name ? pool_name : "")); if (identity_type) { identity = identification_create_from_encoding(identity_type, identity_chunk); - printf(" %-15.15Y ", identity); + printf(" %-20.20Y ", identity); identity->destroy(identity); } else { - printf(" "); + printf(" "); } value_type = VALUE_HEX; |