static int runloop(void)
{
	dbgprintf("imhttp started.\n");

	/* Add handler for form data */
	for(instanceConf_t *inst = runModConf->root ; inst != NULL ; inst = inst->next) {
		assert(inst->pszEndpoint);
		if (inst->pszEndpoint) {
			dbgprintf("setting request handler: '%s'\n", inst->pszEndpoint);
			mg_set_request_handler(s_httpserv->ctx, (char *)inst->pszEndpoint, postHandler, inst);
			if (inst->pszBasicAuthFile) {
				mg_set_auth_handler(s_httpserv->ctx, (char *)inst->pszEndpoint, basicAuthHandler, inst);
			}
		}
	}

	/* Wait until the server should be closed */
	while(glbl.GetGlobalInputTermState() == 0) {
		sleep(1);
	}
	return EXIT_SUCCESS;
}
static int runloop(void)
{
	dbgprintf("imhttp started.\n");

	 
	for(instanceConf_t *inst = runModConf->root ; inst != NULL ; inst = inst->next) {
		assert(inst->pszEndpoint);
		if (inst->pszEndpoint) {
			dbgprintf("setting request handler: '%s'\n", inst->pszEndpoint);
			mg_set_request_handler(s_httpserv->ctx, (char *)inst->pszEndpoint, postHandler, inst);
			if (inst->pszBasicAuthFile) {
				mg_set_auth_handler(s_httpserv->ctx, (char *)inst->pszEndpoint, basicAuthHandler, inst);
			}
		}
	}

	 
	while(glbl.GetGlobalInputTermState() == 0) {
		sleep(1);
	}
	return EXIT_SUCCESS;
}