aboutsummaryrefslogtreecommitdiffstats
path: root/glougloud/user.c
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-07-22 05:48:49 +0200
committerLaurent Ghigonis <laurent@p1sec.com>2012-07-22 05:48:49 +0200
commite2ebea69406a13401436e65e51544cda98b10eba (patch)
treec185862bbe770463280a85f9bec9eb5679ef47a3 /glougloud/user.c
parentquick hack to display new connections in window (diff)
downloadglouglou-e2ebea69406a13401436e65e51544cda98b10eba.tar.xz
glouglou-e2ebea69406a13401436e65e51544cda98b10eba.zip
improve newconn fields encoding
Diffstat (limited to '')
-rw-r--r--glougloud/user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/glougloud/user.c b/glougloud/user.c
index 3ed52f4..ae9734f 100644
--- a/glougloud/user.c
+++ b/glougloud/user.c
@@ -463,8 +463,8 @@ conn_add(struct in_addr *src, int src_port, struct in_addr *dst, int dst_port, i
p.newconn_id = id;
p.newconn_src = htonl(src->s_addr);
p.newconn_dst = htonl(dst->s_addr);
- p.newconn_proto = htons(proto);
- p.newconn_size = htons(size << 16);
+ p.newconn_proto = proto;
+ p.newconn_size = htons(size << 8);
sendto_all(&p, PACKET_NEWCONN_SIZE);
}
@@ -481,7 +481,7 @@ conn_data(struct conn *c, int size, int response)
p.ver = PACKET_VERSION;
p.type = PACKET_DATA;
p.data_connid = c->id;
- p.data_size = htons(size << 16 | response); //XXX
+ p.data_size = htons(size << 8 | response); //XXX
sendto_all(&p, PACKET_DATA_SIZE);
}