fixed received test message
[strongswan.git] / 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,