Add direct STL checkpointing

Modified ICG to save the non-canonical name for STLs.  This is typically more readable
because it is shorter.  Added code to the variable server to filter out requests accessing
STLs, because those accesses will not currently work.

refs #206
This commit is contained in:
Alex Lin
2016-04-04 15:07:57 -05:00
parent 0b7e3e2dc9
commit fb7432d096
7 changed files with 36 additions and 11 deletions

View File

@ -15,6 +15,7 @@
#include "trick/sie_c_intf.h"
int Trick::VariableServerThread::bad_ref_int = 0 ;
int Trick::VariableServerThread::do_not_resolve_bad_ref_int = 0 ;
REF2* Trick::VariableServerThread::make_time_ref() {
REF2* new_ref;
@ -62,6 +63,15 @@ int Trick::VariableServerThread::var_add(std::string in_name) {
// Replace the REF2 object we got from ref_attributes with an error-ref.
free(new_ref);
new_ref = make_error_ref(in_name);
// set the address of the data to the do_not_resolve address. We won't retry resolving the name
new_ref->address = (char *)&do_not_resolve_bad_ref_int ;
} else if ( new_ref->attr->type == TRICK_STL ) {
message_publish(MSG_ERROR, "Variable Server: var_add cant add \"%s\" because its an STL variable.\n", in_name.c_str());
// Replace the REF2 object we got from ref_attributes with an error-ref.
free(new_ref);
new_ref = make_error_ref(in_name);
// set the address of the data to the do_not_resolve address. We won't retry resolving the name
new_ref->address = (char *)&do_not_resolve_bad_ref_int ;
}
} else {
message_publish(MSG_ERROR, "Variable Server: BAD MOJO - Missing ATTRIBUTES.");