- char *from_tcpaddress, *from_tcpport, *from_udpaddress, *from_udpport;
- char *to_tcpaddress, *to_tcpport, *to_udpaddress, *to_udpport;
-cp
- sockaddr2str(&e->from.tcpaddress, &from_tcpaddress, &from_tcpport);
- sockaddr2str(&e->from.udpaddress, &from_udpaddress, &from_udpport);
- sockaddr2str(&e->to.tcpaddress, &to_tcpaddress, &to_tcpport);
- sockaddr2str(&e->to.udpaddress, &to_udpaddress, &to_udpport);
- x = send_request(c, "%d %s %s %s %s %s %s %s %s %lx %d", ADD_EDGE,
- e->from.node->name, from_tcpaddress, from_tcpport, from_udpport,
- e->to.node->name, to_tcpaddress, to_tcpport, to_udpport,
+ char *address, *port;
+ cp();
+ sockaddr2str(&e->address, &address, &port);
+ x = send_request(c, "%d %lx %s %s %s %s %lx %d", ADD_EDGE, random(),
+ e->from->name, e->to->name, address, port,