static const response* reset(void) { if (loaded) { session_resetenv(); session_delnum("maxdatabytes"); } return 0; }
static void addflag(const char *var, const char* flag, int reset) { if(!session_getnum(var, 0)) return; if(reset) session_delnum(var); if(mflags.len) str_cats(&mflags, ","); str_cats(&mflags, flag); }
/* open the connection */ static const response* sq_sender(str* sender, str* params) { if(!opendb()) return &resp_internal; const response *r; if(sqlseq) { /* dump the previous one */ dosqlog(); sqlseq = 0; session_delnum("sqlseq"); } r = get_seq(); if(r) return r; /* seq error */ str_copy(&qsender, sender); str_init(&qrecips); return 0; (void)params; }