Fix math
This commit is contained in:
parent
aa1884ff41
commit
0395746c28
2 changed files with 2 additions and 2 deletions
|
@ -205,7 +205,7 @@ int algo_rr_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo
|
|||
struct evt_core_fdinfo *to_fdinfo = NULL;
|
||||
uint16_t min_pkt;
|
||||
char url[255];
|
||||
size_t health_packet_size = sizeof(bp->ip.ap.fmt.headers) - sizeof(bp->ip.ap.fmt.content.health);
|
||||
size_t health_packet_size = sizeof(bp->ip.ap.fmt.headers) + sizeof(bp->ip.ap.fmt.content.health);
|
||||
size_t max_size = sizeof(struct internet_packet) - health_packet_size;
|
||||
|
||||
if (ctx->verbose > 1) fprintf(stderr, " [algo/rr] Read a UDP packet on URL %s\n", fdinfo->url);
|
||||
|
|
|
@ -39,7 +39,7 @@ enum FD_STATE read_packet_from_tcp(int fd, struct buffer_packet* bp) {
|
|||
enum FD_STATE write_packet_to_tcp(int fd, struct buffer_packet* bp) {
|
||||
ssize_t nwrite;
|
||||
|
||||
dump_buffer_packet (bp);
|
||||
// dump_buffer_packet (bp);
|
||||
if (bp->mode != BP_WRITING) return FDS_ERR;
|
||||
while (bp->awrite < get_full_size(bp)) {
|
||||
nwrite = send(fd, &(bp->ip.ap.raw) + bp->awrite, get_full_size(bp) - bp->awrite, 0);
|
||||
|
|
Loading…
Reference in a new issue