Forum Discussion
Ulf_Wätterstam
Mar 01, 2011Nimbostratus
Ok, I found out why.... So in case someone else is struggling with this I add what I found out.
It is the way I take out the key.
set key [getfield $cdata " " 2]
This returns in case of string ‘set testKey 0 6….’ a string length of 7 (‘testKey’) but when the string is ’get testKey’ it will return a string length of 9 (‘testkey\r\n’ maybe). So I needed to trim my key.
set key [string trim [getfield $cdata " " 2]]
now I get the same value in my key and the algorithm works