- if(n->outcompression) {
- int len = compress_packet(outpkt.data + offset, origpkt->data + offset, origpkt->len - offset, n->outcompression);
- if(len < 0) {
- logger(DEBUG_TRAFFIC, LOG_ERR, "Error while compressing packet to %s (%s)", n->name, n->hostname);
- } else if(len < origpkt->len - offset) {
- outpkt.len = len + offset;
- origpkt = &outpkt;
- type |= PKT_COMPRESSED;
- }
- }