mirror of
https://github.com/nasa/trick.git
synced 2025-06-23 09:15:29 +00:00
Add option to validate pointer addresses in variable server clients
Added a flag called validate_address to each variable server thread. When activated each pointer address will be tested to see if it is in memory the memory manager is tracking. If it is then everything proceeds normally. If it does not, then an error return value is returned for the value of this variable. refs #193
This commit is contained in:
@ -114,6 +114,15 @@ int var_exit() {
|
||||
return(0) ;
|
||||
}
|
||||
|
||||
int var_validate_address(int on_off) {
|
||||
Trick::VariableServerThread * vst ;
|
||||
vst = get_vst() ;
|
||||
if (vst != NULL ) {
|
||||
vst->var_validate_address((bool)on_off) ;
|
||||
}
|
||||
return(0) ;
|
||||
}
|
||||
|
||||
int var_debug(int level) {
|
||||
Trick::VariableServerThread * vst ;
|
||||
vst = get_vst() ;
|
||||
@ -142,11 +151,7 @@ int var_binary() {
|
||||
}
|
||||
|
||||
int var_retry_bad_ref() {
|
||||
Trick::VariableServerThread * vst ;
|
||||
vst = get_vst() ;
|
||||
if (vst != NULL ) {
|
||||
vst->var_retry_bad_ref() ;
|
||||
}
|
||||
message_publish(MSG_WARNING,"var_retry_bad_ref has been deprecated\n") ;
|
||||
return(0) ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user