add some debug msgs

This commit is contained in:
lxsang 2019-04-29 10:44:34 +02:00
parent 21399ac8c7
commit 5155e9e0f5
2 changed files with 15 additions and 11 deletions

View File

@ -190,7 +190,7 @@ void *accept_request(void *data)
return task; return task;
} }
task->handle = accept_request; task->handle = accept_request;
task->status = TASK_ACCEPT; task->status = TASK_ACCEPT_PEND;
return task; return task;
} }
// perform the ssl handshake if enabled // perform the ssl handshake if enabled
@ -208,7 +208,7 @@ void *accept_request(void *data)
case SSL_ERROR_WANT_WRITE: case SSL_ERROR_WANT_WRITE:
case SSL_ERROR_NONE: case SSL_ERROR_NONE:
//LOG("RETRY SSL %d\n", client->sock); //LOG("RETRY SSL %d\n", client->sock);
task->status = TASK_ACCEPT; task->status = TASK_ACCEPT_SSL_CONT;
task->handle = accept_request; task->handle = accept_request;
//task->priority = HIGH_PRIORITY; //task->priority = HIGH_PRIORITY;
//task->type = LIGHT; //task->type = LIGHT;
@ -225,7 +225,7 @@ void *accept_request(void *data)
// reset the waiting // reset the waiting
client->last_wait = 0; client->last_wait = 0;
task->handle = accept_request; task->handle = accept_request;
task->status = TASK_ACCEPT; task->status = TASK_ACCEPT_HS_DONE;
LOG("Handshake finish for %d\n", client->sock); LOG("Handshake finish for %d\n", client->sock);
return task; return task;
} }
@ -242,7 +242,7 @@ void *accept_request(void *data)
return task; return task;
} }
task->handle = accept_request; task->handle = accept_request;
task->status = TASK_ACCEPT; task->status = TASK_ACCEPT_READWAIT;
return task; return task;
} }
} }

View File

@ -20,13 +20,17 @@
// define all task status here // define all task status here
// for debug purpose // for debug purpose
#define TASK_ACCEPT 0x01 #define TASK_ACCEPT 0x01
#define TASK_DECODE_HEADER 0x02; #define TASK_ACCEPT_PEND 0xA0
#define TASK_DECODE_RQ 0x03; #define TASK_ACCEPT_SSL_CONT 0xA1
#define TASK_RESOLVE_RQ 0x04; #define TASK_ACCEPT_HS_DONE 0xA2
#define TASK_EXEC_PLUGIN_RAW 0x05; // with raw data #define TASK_ACCEPT_READWAIT 0xA3
#define TASK_EXEC_PLUGIN_COOK 0x06; // with decoded post request data #define TASK_DECODE_HEADER 0x02
#define TASK_SERVE_FILE 0x07; #define TASK_DECODE_RQ 0x03
#define TASK_DECODE_MP_DATA 0x08; #define TASK_RESOLVE_RQ 0x04
#define TASK_EXEC_PLUGIN_RAW 0x05 // with raw data
#define TASK_EXEC_PLUGIN_COOK 0x06 // with decoded post request data
#define TASK_SERVE_FILE 0x07
#define TASK_DECODE_MP_DATA 0x08
config_t* config(); config_t* config();
void destroy_config(); void destroy_config();