From: Andreas Steffen Date: Wed, 10 Nov 2010 21:02:20 +0000 (+0100) Subject: fixed received test message X-Git-Tag: 4.5.1~528 X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=commitdiff_plain;h=c0cb1f8a09fcc157dc2ad75775afc17340d8342d fixed received test message --- diff --git a/src/libcharon/plugins/tnccs_20/tnccs_20.c b/src/libcharon/plugins/tnccs_20/tnccs_20.c index 72a5288..fd76680 100644 --- a/src/libcharon/plugins/tnccs_20/tnccs_20.c +++ b/src/libcharon/plugins/tnccs_20/tnccs_20.c @@ -152,13 +152,14 @@ METHOD(tls_t, process, status_t, if (pos) { pos++; - len = buflen - ((char*)buf - pos); + len = buflen - (pos - (char*)buf); } else { pos = buf; len = buflen; } + DBG1(DBG_TNC, "received message '%.*s'", len, pos); if (this->is_server) { charon->imvs->receive_message(charon->imvs, this->connection_id,