Commit 4fbed234 authored by deuce's avatar deuce
Browse files

Fix writebuf() misusage, and fix a couple warnings.

parent a6244fd8
......@@ -423,8 +423,8 @@ static int lprintf(int level, char *fmt, ...)
static int writebuf(http_session_t *session, const char *buf, size_t len)
{
int sent=0;
int avail;
size_t sent=0;
size_t avail;
while(!terminate_server && sent < len) {
avail=RingBufFree(&session->outbuf);
......@@ -2871,7 +2871,7 @@ static BOOL exec_cgi(http_session_t *session)
if(msglen) {
lprintf(LOG_DEBUG,"%04d Sending %d bytes: %.*s"
,session->socket,msglen,msglen,buf);
wr=writebuf(session,session->socket,buf,msglen,NULL);
wr=writebuf(session,buf,msglen);
/* log actual bytes sent */
if(session->req.ld!=NULL && wr>0)
session->req.ld->size+=wr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment