diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2014-08-19 07:42:40 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2014-10-03 22:25:09 +0200 |
commit | 89d12654b343e92fc7a4f511b32475402a5120ed (patch) | |
tree | c6e836e61c3757486f09aabeb1e04b3e475d7224 /src/libimcv/seg_contract/seg_contract.c | |
parent | f50968976b4f1e3415833edb26877889fe1eeed7 (diff) | |
download | strongswan-89d12654b343e92fc7a4f511b32475402a5120ed.tar.bz2 strongswan-89d12654b343e92fc7a4f511b32475402a5120ed.tar.xz |
Added request variable to get_info_string method
Diffstat (limited to 'src/libimcv/seg_contract/seg_contract.c')
-rw-r--r-- | src/libimcv/seg_contract/seg_contract.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libimcv/seg_contract/seg_contract.c b/src/libimcv/seg_contract/seg_contract.c index 729bcbc34..dab2c239f 100644 --- a/src/libimcv/seg_contract/seg_contract.c +++ b/src/libimcv/seg_contract/seg_contract.c @@ -110,7 +110,7 @@ METHOD(seg_contract_t, is_null, bool, } METHOD(seg_contract_t, get_info_string, void, - private_seg_contract_t *this, char *buf, size_t len) + private_seg_contract_t *this, char *buf, size_t len, bool request) { enum_name_t *pa_subtype_names; uint32_t msg_vid, msg_subtype; @@ -120,7 +120,7 @@ METHOD(seg_contract_t, get_info_string, void, /* nul-terminate the string buffer */ buf[--len] = '\0'; - if (this->is_issuer) + if (this->is_issuer && request) { written = snprintf(pos, len, "%s %d requests", this->is_imc ? "IMC" : "IMV", this->issuer_id); @@ -136,8 +136,8 @@ METHOD(seg_contract_t, get_info_string, void, pos += written; len -= written; - written = snprintf(pos, len, " a %ssegmentation contract ", - this->is_null ? "null" : ""); + written = snprintf(pos, len, " a %ssegmentation contract%s ", + this->is_null ? "null" : "", request ? "" : " response"); if (written < 0 || written > len) { return; |