void files_free_static (void) { dl::enter_critical_section();//OK if (dl::query_num == opened_files_last_query_num) { const array <FILE *> *const_opened_files = opened_files; for (array <FILE *>::const_iterator p = const_opened_files->begin(); p != const_opened_files->end(); ++p) { if (neq2 (p.get_key(), STDOUT) && neq2 (p.get_key(), STDERR)) { fclose (p.get_value()); } } opened_files_last_query_num--; } if (opened_fd != -1) { close_safe (opened_fd); } CLEAR_VAR(string, raw_post_data); dl::leave_critical_section(); }
void PARSE_MESSAGE_COORD(float flValue) { if(msgActive) { message_var_t message_var; message_t message; message_var.fValue = flValue; message.iType = MESSAGE_TYPE_COORD; message.mValue = message_var; CLEAR_VAR(curMessageIndex); curMessage[curMessageIndex] = message; curMessageIndex++; } }
void PARSE_MESSAGE_BYTE(int iValue) { if(msgActive) { message_var_t message_var; message_t message; message_var.iValue = iValue; //SERVER_PRINT(temp->sValue); message.iType = MESSAGE_TYPE_BYTE; message.mValue = message_var; CLEAR_VAR(curMessageIndex); curMessage[curMessageIndex] = message; curMessageIndex++; } }
void PARSE_MESSAGE_STRING(const char *sz) { if(msgActive) { message_var_t message_var; message_t message; strcpy(message_var.sValue, sz); /*char tmp[50]; sprintf(tmp, "Setting index %d to %s\n", curMessageIndex, sz); SERVER_PRINT(tmp);*/ message.iType = MESSAGE_TYPE_STRING; message.mValue = message_var; CLEAR_VAR(curMessageIndex); curMessage[curMessageIndex] = message; curMessageIndex++; } }