@ -488,8 +488,6 @@ void httpdContinue(HttpdConnData *conn)
{
{
httpdPlatLock ( ) ;
httpdPlatLock ( ) ;
uint8_t * sendBuff ;
if ( conn = = NULL ) { return ; }
if ( conn = = NULL ) { return ; }
if ( conn - > priv . sendBacklog ! = NULL ) {
if ( conn - > priv . sendBacklog ! = NULL ) {
@ -516,13 +514,6 @@ void httpdContinue(HttpdConnData *conn)
return ;
return ;
}
}
sendBuff = httpdMalloc ( HTTPD_MAX_SENDBUFF_LEN ) ;
if ( sendBuff = = NULL ) {
http_error ( " Malloc of sendBuff failed! " ) ;
httpdPlatUnlock ( ) ;
return ;
}
conn - > priv . sendBuff = sendBuff ;
conn - > priv . sendBuffLen = 0 ;
conn - > priv . sendBuffLen = 0 ;
httpd_cgi_state r = conn - > cgi ( conn ) ; //Execute cgi fn.
httpd_cgi_state r = conn - > cgi ( conn ) ; //Execute cgi fn.
if ( r = = HTTPD_CGI_DONE ) {
if ( r = = HTTPD_CGI_DONE ) {
@ -533,7 +524,6 @@ void httpdContinue(HttpdConnData *conn)
httpdCgiIsDone ( conn ) ;
httpdCgiIsDone ( conn ) ;
}
}
httpdFlushSendBuffer ( conn ) ;
httpdFlushSendBuffer ( conn ) ;
httpdFree ( sendBuff ) ;
httpdPlatUnlock ( ) ;
httpdPlatUnlock ( ) ;
}
}
@ -732,12 +722,6 @@ static void httpdParseHeader(char *h, HttpdConnData *conn)
void httpdConnSendStart ( HttpdConnData * conn )
void httpdConnSendStart ( HttpdConnData * conn )
{
{
httpdPlatLock ( ) ;
httpdPlatLock ( ) ;
uint8_t * sendBuff = httpdMalloc ( HTTPD_MAX_SENDBUFF_LEN ) ;
if ( sendBuff = = NULL ) {
http_error ( " Malloc sendBuff failed! " ) ;
return ;
}
conn - > priv . sendBuff = sendBuff ;
conn - > priv . sendBuffLen = 0 ;
conn - > priv . sendBuffLen = 0 ;
}
}
@ -745,8 +729,6 @@ void httpdConnSendStart(HttpdConnData *conn)
void httpdConnSendFinish ( HttpdConnData * conn )
void httpdConnSendFinish ( HttpdConnData * conn )
{
{
if ( conn - > conn ) { httpdFlushSendBuffer ( conn ) ; }
if ( conn - > conn ) { httpdFlushSendBuffer ( conn ) ; }
httpdFree ( conn - > priv . sendBuff ) ;
conn - > priv . sendBuff = NULL ;
httpdPlatUnlock ( ) ;
httpdPlatUnlock ( ) ;
}
}
@ -764,14 +746,6 @@ void httpdRecvCb(ConnTypePtr rconn, httpd_ipaddr_t remIp, uint16_t remPort, uint
return ;
return ;
}
}
uint8_t * sendBuff = httpdMalloc ( HTTPD_MAX_SENDBUFF_LEN ) ;
if ( sendBuff = = NULL ) {
http_error ( " Malloc sendBuff failed! " ) ;
httpdPlatUnlock ( ) ;
return ;
}
conn - > priv . sendBuff = sendBuff ;
conn - > priv . sendBuffLen = 0 ;
conn - > priv . sendBuffLen = 0 ;
conn - > priv . corsToken [ 0 ] = 0 ;
conn - > priv . corsToken [ 0 ] = 0 ;
@ -853,7 +827,6 @@ void httpdRecvCb(ConnTypePtr rconn, httpd_ipaddr_t remIp, uint16_t remPort, uint
if ( conn - > conn ) {
if ( conn - > conn ) {
httpdFlushSendBuffer ( conn ) ;
httpdFlushSendBuffer ( conn ) ;
}
}
httpdFree ( sendBuff ) ;
httpdPlatUnlock ( ) ;
httpdPlatUnlock ( ) ;
}
}