Hopefully finally fixed cut off messages
This commit is contained in:
parent
e27dab12a7
commit
6ed6115f81
17
www.c
17
www.c
@ -63,8 +63,10 @@ void www_request_completed(void *cls, struct MHD_Connection *connection, void **
|
|||||||
free(con_info->keys);
|
free(con_info->keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (con_info->pp != NULL) {
|
||||||
MHD_destroy_post_processor(con_info->pp);
|
MHD_destroy_post_processor(con_info->pp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (con_info->user != NULL) {
|
if (con_info->user != NULL) {
|
||||||
free(con_info->user->loginname);
|
free(con_info->user->loginname);
|
||||||
free(con_info->user->password);
|
free(con_info->user->password);
|
||||||
@ -85,6 +87,11 @@ static int iterate_post (void *coninfo_cls, enum MHD_ValueKind kind, const char
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (size == 0) {
|
||||||
|
return MHD_NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (con_info != NULL) {
|
if (con_info != NULL) {
|
||||||
if (con_info->connection_type == POST) {
|
if (con_info->connection_type == POST) {
|
||||||
for (i=0;i<con_info->count;i++) {
|
for (i=0;i<con_info->count;i++) {
|
||||||
@ -389,6 +396,7 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
|
|||||||
con_inf->user = NULL;
|
con_inf->user = NULL;
|
||||||
con_inf->count = 0;
|
con_inf->count = 0;
|
||||||
con_inf->url = strdup(url);
|
con_inf->url = strdup(url);
|
||||||
|
con_inf->pp = NULL;
|
||||||
*ptr = con_inf;
|
*ptr = con_inf;
|
||||||
return MHD_YES;
|
return MHD_YES;
|
||||||
}
|
}
|
||||||
@ -402,6 +410,7 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
|
|||||||
con_inf->user = NULL;
|
con_inf->user = NULL;
|
||||||
con_inf->count = 0;
|
con_inf->count = 0;
|
||||||
con_inf->url = strdup(url);
|
con_inf->url = strdup(url);
|
||||||
|
con_inf->pp = NULL;
|
||||||
*ptr = con_inf;
|
*ptr = con_inf;
|
||||||
return MHD_YES;
|
return MHD_YES;
|
||||||
}
|
}
|
||||||
@ -779,10 +788,11 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
|
|||||||
free(footer);
|
free(footer);
|
||||||
return MHD_YES;
|
return MHD_YES;
|
||||||
}
|
}
|
||||||
|
if (con_inf->pp == NULL) {
|
||||||
con_inf->pp = MHD_create_post_processor(connection, POSTBUFFERSIZE, iterate_post, (void*) con_inf);
|
con_inf->pp = MHD_create_post_processor(connection, POSTBUFFERSIZE, iterate_post, (void*) con_inf);
|
||||||
|
}
|
||||||
if (*upload_data_size != 0) {
|
if (*upload_data_size != 0) {
|
||||||
|
|
||||||
MHD_post_process (con_inf->pp, upload_data, *upload_data_size);
|
MHD_post_process (con_inf->pp, upload_data, *upload_data_size);
|
||||||
*upload_data_size = 0;
|
*upload_data_size = 0;
|
||||||
|
|
||||||
@ -830,8 +840,9 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
|
|||||||
free(footer);
|
free(footer);
|
||||||
return MHD_YES;
|
return MHD_YES;
|
||||||
}
|
}
|
||||||
|
if (con_inf->pp == NULL) {
|
||||||
con_inf->pp = MHD_create_post_processor(connection, POSTBUFFERSIZE, iterate_post, (void*) con_inf);
|
con_inf->pp = MHD_create_post_processor(connection, POSTBUFFERSIZE, iterate_post, (void*) con_inf);
|
||||||
|
}
|
||||||
|
|
||||||
if (*upload_data_size != 0) {
|
if (*upload_data_size != 0) {
|
||||||
MHD_post_process (con_inf->pp, upload_data, *upload_data_size);
|
MHD_post_process (con_inf->pp, upload_data, *upload_data_size);
|
||||||
|
Reference in New Issue
Block a user