Reformat calls to http_SendMessage().

(cherry picked from commit bfbd07cb4097df86b6afb9419e23d271ddc8bd6f)
This commit is contained in:
Marcelo Roberto Jimenez 2010-11-24 11:12:33 -02:00
parent 0977f8864d
commit 3bf6f90751

View File

@ -1464,35 +1464,31 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
/* send response */ /* send response */
switch (rtype) { switch (rtype) {
case RESP_FILEDOC: case RESP_FILEDOC:
/* send file, I = further instruction to send data. */ http_SendMessage(info, &timeout, "Ibf",
http_SendMessage(info, &timeout, "Ibf", &RespInstr, &RespInstr,
headers.buf, headers.length, headers.buf, headers.length,
filename.buf); filename.buf);
break; break;
case RESP_XMLDOC: case RESP_XMLDOC:
/* send xmldoc , I = further instruction to send data. */ http_SendMessage(info, &timeout, "Ibb",
http_SendMessage(info, &timeout, &RespInstr,
"Ibb", &RespInstr,
headers.buf, headers.length, headers.buf, headers.length,
xmldoc.doc.buf, xmldoc.doc.length); xmldoc.doc.buf, xmldoc.doc.length);
alias_release(&xmldoc); alias_release(&xmldoc);
break; break;
case RESP_WEBDOC: case RESP_WEBDOC:
/*, I = further instruction to send data. */ /*http_SendVirtualDirDoc(info, &timeout, "Ibf",
/* &RespInstr,
http_SendVirtualDirDoc( info, &timeout, "Ibf",&RespInstr,
headers.buf, headers.length, headers.buf, headers.length,
filename.buf ); filename.buf);*/
*/ http_SendMessage(info, &timeout, "Ibf",
http_SendMessage(info, &timeout, &RespInstr,
"Ibf", &RespInstr,
headers.buf, headers.length, headers.buf, headers.length,
filename.buf); filename.buf);
break; break;
case RESP_HEADERS: case RESP_HEADERS:
/* headers only */ /* headers only */
http_SendMessage(info, &timeout, http_SendMessage(info, &timeout, "b",
"b",
headers.buf, headers.length); headers.buf, headers.length);
break; break;
case RESP_POST: case RESP_POST:
@ -1503,10 +1499,12 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
http_MakeMessage(&headers, 1, 1, http_MakeMessage(&headers, 1, 1,
"RTLSXcCc", "RTLSXcCc",
ret, "text/html", X_USER_AGENT); ret, "text/html", X_USER_AGENT);
http_SendMessage(info, &timeout, "b", headers.buf, http_SendMessage(info, &timeout, "b",
headers.length); headers.buf, headers.length);
break; break;
default: default:
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
"webserver: Invalid response type received.\n");
assert(0); assert(0);
} }
} }