summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author姜鹏辉 <[email protected]>2020-12-01 16:39:34 +0800
committer姜鹏辉 <[email protected]>2020-12-01 16:39:34 +0800
commit1555fb11f82f2bc560fa116c9b752e0f2081d045 (patch)
tree8e8f99cace5b4648713e8f47996b309452bb6b95
parentacd5d17deb92ce5daedd2fa2d7af4111046b7493 (diff)
fix bugs about response
-rw-r--r--qq_file_send.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/qq_file_send.c b/qq_file_send.c
index cce54a4..359e7f5 100644
--- a/qq_file_send.c
+++ b/qq_file_send.c
@@ -362,10 +362,7 @@ uchar qq_file_send_entry(stSessionInfo* session_info,void **pme,int thread_seq,s
//int payload_len = tcp_detail->datalen;
//char *payload =(char *)tcp_detail->pdata;
- if (*pme == NULL)
- {
- *pme =(qq_pme_info_p)malloc(sizeof(qq_pme_info));
- }
+
qq_pme_info_p qq_pme = (qq_pme_info_p) *pme;
http_infor* a_http = (http_infor *)(session_info->app_info);
@@ -373,12 +370,21 @@ uchar qq_file_send_entry(stSessionInfo* session_info,void **pme,int thread_seq,s
{
case HTTP_REQ_LINE:
if(a_http->method!=HTTP_METHOD_POST)
- {
+ {
return PROT_STATE_DROPME;
}
+ if (*pme == NULL)
+ {
+ *pme =(qq_pme_info_p)malloc(sizeof(qq_pme_info));
+ qq_pme = *pme;
+ }
qq_pme->curdir = a_http->curdir;
break;
case HTTP_RES_LINE:
+ if (qq_pme == NULL)
+ {
+ return PROT_STATE_DROPME;
+ }
break;
case HTTP_MESSAGE_URL:
url_decoded_len = session_info->buflen;
@@ -478,7 +484,6 @@ int suggestion_inform_callback(struct suggest_receive_info *info, struct nirvana
return 0;
}
-
void nirvana_client_init()
{
struct nirvana_parameter *parameter;
@@ -493,7 +498,7 @@ void qq_file_send_init()
printf("qq_file_send init\n");
int read_res = 0;
- runtime_log = MESA_create_runtime_log_handle(LOG_PATH, 20);
+ runtime_log = MESA_create_runtime_log_handle(LOG_PATH, 10);
const char *inf_file = "./plug/business/qq_file_send/qq_file_send.inf";
read_res += read_profile_of_separator(inf_file,&online_feature,"ONLINE_FEATURE",ONLINE_SEND);