Forum Discussion
Diego_19194
Jul 26, 2007Nimbostratus
Thank you very much.
Now, the parser is working, but I found that when I recieve the answer I need to add the 9, because of the communication with the other server is with 9, if not the answer will be "500 Command unrecognized".
I wrote:
set sdata [TCP::payload]
set digit_nine "9"
set find {(54)([0-9]*)(/TYPE)}
if { [regexp $find $sdata] > 0} {
regsub -all $find $sdata "\\1$digit_nine\\2\\3" sdata
TCP::payload replace 0 [string length $sdata] "$sdata"
}
And the error is "Jul 26 11:35:36 tmm tmm[730]: 01220001:3: TCL error: Rule remove_9_MSISDN - Out of bounds (line 1) invoked from within "TCP::payload replace 0 [string length $sdata] "$sdata"""
I know that this mean that I cannot add a new character in the payload, but then how can I do it?