diff --git a/apps/dsm/DSMCoreModule.h b/apps/dsm/DSMCoreModule.h index b02f1d13..a15c48e1 100644 --- a/apps/dsm/DSMCoreModule.h +++ b/apps/dsm/DSMCoreModule.h @@ -171,6 +171,10 @@ class TestDSMCondition map* event_params); }; +/** return string q with variables/params/selects replaced */ +string replaceParams(const string& q, AmSession* sess, DSMSession* sc_sess, + map* event_params); + /** return string q with variables/params/selects replaced */ string replaceParams(const string& q, AmSession* sess, DSMSession* sc_sess, map* event_params); diff --git a/apps/dsm/DSMSession.h b/apps/dsm/DSMSession.h index fbc46b17..c2840926 100644 --- a/apps/dsm/DSMSession.h +++ b/apps/dsm/DSMSession.h @@ -111,6 +111,18 @@ using std::map; s->CLR_STRERROR; \ } while (0) +#define SET_ERROR(s, errno, errstr) \ + do { \ + s->SET_ERRNO(errno); \ + s->SET_STRERROR(errstr); \ + } while (0) + +#define CLR_ERROR(s) \ + do { \ + s->CLR_ERRNO; \ + s->CLR_STRERROR; \ + } while (0) + typedef map VarMapT; typedef map AVarMapT;