Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › (SAVEOK_SAVE/to_star_rx) FATAL ERROR! › Reply To: (SAVEOK_SAVE/to_star_rx) FATAL ERROR!
__________________________________________________________
proc sendOK_save { args } {
keylget args MODE mode ;# What mode are we in
global ob_save ;# OB message saved here
global HciConnName
if ![info exists HciConnName] { set HciConnName UNKNOWN }
set module “(SAVEOK_SAVE/$HciConnName)”
keylget args ARGS uarg
switch -exact — $mode {
start {
# Initialize the ob_save global if needed
if ![info exists ob_save] {
set ob_save “”
}
return “”
}
run {
keylget args CONTEXT ctx
keylget args MSGID mh
if ![cequal $ctx send_data_ok] {
echo “$module Called with invalid context!”
echo “$module Should be SEND OK for OB DATA only.”
echo “$module Continuing msg.”
return “{CONTINUE $mh}”
}
if [cequal $ob_save “”] {
set ob_save $mh
# Do NOT return msg to the engine
return
}
# Something bad happened. Proc that uses the saved msg
# did not clean up after itself!
set errmsg “$module FATAL ERROR! Attempt to save over
message ‘$ob_save’ with message ‘$mh'”
echo “$module $errmsg”
echo “$module Existing msg:”
msgdump $ob_save
echo “$module New msg:”
msgdump $mh
error $errmsg; # Put msg in errdb
}
default {
echo “Unknown mode in
return “” ;# Dont know what to do
}
}
}