fixed received test message
authorAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 10 Nov 2010 21:02:20 +0000 (22:02 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 10 Nov 2010 21:02:20 +0000 (22:02 +0100)
src/libcharon/plugins/tnccs_20/tnccs_20.c

index 72a5288..fd76680 100644 (file)
@@ -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,