From: Andreas Steffen Date: Mon, 12 Jul 2010 18:26:17 +0000 (+0200) Subject: output identities correctly X-Git-Tag: 4.4.1~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb0a9d58a38d2fe163eb61d350f403a47842cdca;p=thirdparty%2Fstrongswan.git output identities correctly --- diff --git a/src/libhydra/plugins/attr_sql/pool_attributes.c b/src/libhydra/plugins/attr_sql/pool_attributes.c index 52efc6310c..19505c6aad 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;