summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
58e30fc)
We were trying the wrong port due to a forgotten byteswap. Also, if no
address was known at all for a node, there might be an outgoing structure
for it that would never be retried.
switch(sa.sa.sa_family) {
case AF_INET:
switch(sa.sa.sa_family) {
case AF_INET:
+ sa.in.sin_port = htons(port);
- sa.in6.sin6_port = port;
+ sa.in6.sin6_port = htons(port);
if(sa.sa.sa_family != AF_UNKNOWN) {
n->catta_address = sa;
if(sa.sa.sa_family != AF_UNKNOWN) {
n->catta_address = sa;
+ n->last_connect_try = 0;
node_add_recent_address(mesh, n, &sa);
node_add_recent_address(mesh, n, &sa);
- connection_t *c = n->connection;
+ if(n->connection) {
+ n->connection->last_ping_time = -3600;
+ }
+
+ for list_each(outgoing_t, outgoing, mesh->outgoings) {
+ if(outgoing->node != n) {
+ continue;
+ }
- if(c && c->outgoing && !c->status.active) {
- c->outgoing->timeout = 0;
- if(c->outgoing->ev.cb) {
- timeout_set(&mesh->loop, &c->outgoing->ev, &(struct timespec) {
+ if(outgoing->ev.cb) {
+ timeout_set(&mesh->loop, &outgoing->ev, &(struct timespec) {
-
- c->last_ping_time = -3600;
/* We are waiting for a callback from the ADNS thread */
} else if(outgoing->state == OUTGOING_NO_KNOWN_ADDRESSES) {
logger(mesh, MESHLINK_ERROR, "No known addresses for %s", outgoing->node->name);
/* We are waiting for a callback from the ADNS thread */
} else if(outgoing->state == OUTGOING_NO_KNOWN_ADDRESSES) {
logger(mesh, MESHLINK_ERROR, "No known addresses for %s", outgoing->node->name);
+ list_delete(mesh->outgoings, outgoing);
} else {
logger(mesh, MESHLINK_ERROR, "Could not set up a meta connection to %s", outgoing->node->name);
retry_outgoing(mesh, outgoing);
} else {
logger(mesh, MESHLINK_ERROR, "Could not set up a meta connection to %s", outgoing->node->name);
retry_outgoing(mesh, outgoing);