http: remove unused param from HtpBodyAppendChunk

pull/1886/merge
Victor Julien 10 years ago
parent 6e3514a444
commit 83f400dd60

@ -73,7 +73,7 @@
* \retval 0 ok
* \retval -1 error
*/
int HtpBodyAppendChunk(HtpTxUserData *htud, HtpBody *body, uint8_t *data, uint32_t len)
int HtpBodyAppendChunk(HtpBody *body, const uint8_t *data, uint32_t len)
{
SCEnter();

@ -28,7 +28,7 @@
#ifndef __APP_LAYER_HTP_BODY_H__
#define __APP_LAYER_HTP_BODY_H__
int HtpBodyAppendChunk(HtpTxUserData *, HtpBody *, uint8_t *, uint32_t);
int HtpBodyAppendChunk(HtpBody *, const uint8_t *, uint32_t);
void HtpBodyPrint(HtpBody *);
void HtpBodyFree(HtpBody *);
void HtpBodyPrune(HtpState *, HtpBody *, int);

@ -1844,7 +1844,7 @@ int HTPCallbackRequestBodyData(htp_tx_data_t *d)
}
SCLogDebug("len %u", len);
HtpBodyAppendChunk(tx_ud, &tx_ud->request_body, (uint8_t *)d->data, len);
HtpBodyAppendChunk(&tx_ud->request_body, d->data, len);
uint8_t *chunks_buffer = NULL;
uint32_t chunks_buffer_len = 0;
@ -1943,7 +1943,7 @@ int HTPCallbackResponseBodyData(htp_tx_data_t *d)
}
SCLogDebug("len %u", len);
HtpBodyAppendChunk(tx_ud, &tx_ud->response_body, (uint8_t *)d->data, len);
HtpBodyAppendChunk(&tx_ud->response_body, d->data, len);
HtpResponseBodyHandle(hstate, tx_ud, d->tx, (uint8_t *)d->data, (uint32_t)d->len);
} else {
@ -5665,9 +5665,9 @@ static int HTPBodyReassemblyTest01(void)
uint8_t chunk1[] = "--e5a320f21416a02493a0a6f561b1c494\r\nContent-Disposition: form-data; name=\"uploadfile\"; filename=\"D2GUef.jpg\"\r";
uint8_t chunk2[] = "POST /uri HTTP/1.1\r\nHost: hostname.com\r\nKeep-Alive: 115\r\nAccept-Charset: utf-8\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nConnection: keep-alive\r\nContent-length: 68102\r\nReferer: http://otherhost.com\r\nAccept-Encoding: gzip\r\nContent-Type: multipart/form-data; boundary=e5a320f21416a02493a0a6f561b1c494\r\nCookie: blah\r\nAccept-Language: us\r\n\r\n--e5a320f21416a02493a0a6f561b1c494\r\nContent-Disposition: form-data; name=\"uploadfile\"; filename=\"D2GUef.jpg\"\r";
int r = HtpBodyAppendChunk(&htud, &htud.request_body, (uint8_t *)chunk1, sizeof(chunk1)-1);
int r = HtpBodyAppendChunk(&htud.request_body, chunk1, sizeof(chunk1)-1);
BUG_ON(r != 0);
r = HtpBodyAppendChunk(&htud, &htud.request_body, (uint8_t *)chunk2, sizeof(chunk2)-1);
r = HtpBodyAppendChunk(&htud.request_body, chunk2, sizeof(chunk2)-1);
BUG_ON(r != 0);
uint8_t *chunks_buffer = NULL;

Loading…
Cancel
Save