"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/htx.c" between
haproxy-2.0.13.tar.gz and haproxy-2.0.14.tar.gz

About: HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. LTS (Long-Term Support) release.

htx.c  (haproxy-2.0.13):htx.c  (haproxy-2.0.14)
skipping to change at line 400 skipping to change at line 400
} }
} }
BUG_ON((int32_t)htx->tail_addr < 0); BUG_ON((int32_t)htx->tail_addr < 0);
BUG_ON((int32_t)htx->head_addr < 0); BUG_ON((int32_t)htx->head_addr < 0);
BUG_ON(htx->end_addr > htx->tail_addr); BUG_ON(htx->end_addr > htx->tail_addr);
BUG_ON(htx->head_addr > htx->end_addr); BUG_ON(htx->head_addr > htx->end_addr);
return blk; return blk;
} }
/* Looks for the HTX block containing the offset <offset>, starting at the HTX
* message's head. The function returns an htx_ret with the found HTX block and
* the position inside this block where the offset is. If the offset <offset> is
* ouside of the HTX message, htx_ret.blk is set to NULL.
*/
struct htx_ret htx_find_offset(struct htx *htx, uint32_t offset)
{
struct htx_blk *blk;
struct htx_ret htxret = { .blk = NULL, .ret = 0 };
if (offset >= htx->data)
return htxret;
for (blk = htx_get_head_blk(htx); blk && offset; blk = htx_get_next_blk(h
tx, blk)) {
uint32_t sz = htx_get_blksz(blk);
if (offset < sz)
break;
offset -= sz;
}
htxret.blk = blk;
htxret.ret = offset;
return htxret;
}
/* Removes all blocks after the one containing the offset <offset>. This last /* Removes all blocks after the one containing the offset <offset>. This last
* one may be truncated if it is a DATA block. * one may be truncated if it is a DATA block.
*/ */
void htx_truncate(struct htx *htx, uint32_t offset) void htx_truncate(struct htx *htx, uint32_t offset)
{ {
struct htx_blk *blk; struct htx_blk *blk;
for (blk = htx_get_head_blk(htx); blk && offset; blk = htx_get_next_blk(h tx, blk)) { for (blk = htx_get_head_blk(htx); blk && offset; blk = htx_get_next_blk(h tx, blk)) {
uint32_t sz = htx_get_blksz(blk); uint32_t sz = htx_get_blksz(blk);
enum htx_blk_type type = htx_get_blk_type(blk); enum htx_blk_type type = htx_get_blk_type(blk);
 End of changes. 1 change blocks. 
0 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)