diff options
Diffstat (limited to 'gg_map')
-rw-r--r-- | gg_map/gg_map.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gg_map/gg_map.c b/gg_map/gg_map.c index b89e57b..d91859f 100644 --- a/gg_map/gg_map.c +++ b/gg_map/gg_map.c @@ -91,17 +91,24 @@ _conn_del(int id) { } static void -_conn_data(int id, int size) { +_conn_data(int id, u_int8_t size) { struct ggnet_conn *conn; - Egraph_Vertice *a, *b; + Egraph_Vertice *a, *b, *tmp; + int response; conn = ggnet_conn_find_by_id(_ggnet, id); if (!conn) return; + response = size >> 7; + size = size & 0xe; + a = ggnet_node_usrdata_get(ggnet_conn_src_get(conn)); b = ggnet_node_usrdata_get(ggnet_conn_dst_get(conn)); - egraph_vertice_send_blob(_egraph, a, b, 8, 0xFF000000); + if (response) { + tmp = a; a = b; b = tmp; + } + egraph_vertice_send_blob(_egraph, a, b, 8 + size * 2, 0xFF000000); } int |