aboutsummaryrefslogtreecommitdiffstats
path: root/gg_map/gg_map.c
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-12-11 09:25:08 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-12-11 09:25:08 +0100
commita652fb266fb6d71ab41c86da95ab7306e47df2e7 (patch)
tree844c2cec831148f7f5bf5665ff5773ddaf8f978d /gg_map/gg_map.c
parentdisable edge deletion for now (diff)
downloadglouglou-a652fb266fb6d71ab41c86da95ab7306e47df2e7.tar.xz
glouglou-a652fb266fb6d71ab41c86da95ab7306e47df2e7.zip
send egraph blobs on glouglou data packets
Diffstat (limited to 'gg_map/gg_map.c')
-rw-r--r--gg_map/gg_map.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gg_map/gg_map.c b/gg_map/gg_map.c
index e178b7b..9ee526c 100644
--- a/gg_map/gg_map.c
+++ b/gg_map/gg_map.c
@@ -90,6 +90,20 @@ _conn_del(int id) {
}
}
+static void
+_conn_data(int id, int size) {
+ struct ggnet_conn *conn;
+ Egraph_Vertice *a, *b;
+
+ conn = ggnet_conn_find_by_id(_ggnet, id);
+ if (!conn)
+ return;
+
+ 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, size, 0xFF000000);
+}
+
int
_cb_packet(struct gg_client *cli, struct gg_packet *pkt)
{
@@ -119,8 +133,7 @@ _cb_packet(struct gg_client *cli, struct gg_packet *pkt)
printf(" data_connid %d\n", pkt->data_connid);
printf(" data_size %d\n", pkt->data_size);
- //conn = ggnet_conn_find_by_id(_ggnet, pkt->data_connid);
- // XXX evas_point on conn line
+ _conn_data(pkt->data_connid, pkt->data_size);
break;
case PACKET_NAME: