|
@ -696,7 +696,7 @@ static void register_with_new_peer (n2n_edge_t *eee, |
|
|
/* Normal STUN */ |
|
|
/* Normal STUN */ |
|
|
send_register(eee, &(scan->sock), mac, N2N_REGULAR_REG_COOKIE); |
|
|
send_register(eee, &(scan->sock), mac, N2N_REGULAR_REG_COOKIE); |
|
|
} |
|
|
} |
|
|
send_register(eee, &(eee->curr_sn->sock), mac, N2N_REGULAR_REG_COOKIE); |
|
|
send_register(eee, &(eee->curr_sn->sock), mac, N2N_FORWARDED_REG_COOKIE); |
|
|
} else { |
|
|
} else { |
|
|
/* P2P register, send directly */ |
|
|
/* P2P register, send directly */ |
|
|
send_register(eee, &(scan->sock), mac, N2N_REGULAR_REG_COOKIE); |
|
|
send_register(eee, &(scan->sock), mac, N2N_REGULAR_REG_COOKIE); |
|
@ -2049,7 +2049,7 @@ static int check_query_peer_info (n2n_edge_t *eee, time_t now, n2n_mac_t mac) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(now - scan->last_sent_query > eee->conf.register_interval) { |
|
|
if(now - scan->last_sent_query > eee->conf.register_interval) { |
|
|
send_register(eee, &(eee->curr_sn->sock), mac, N2N_REGULAR_REG_COOKIE); |
|
|
send_register(eee, &(eee->curr_sn->sock), mac, N2N_FORWARDED_REG_COOKIE); |
|
|
send_query_peer(eee, scan->mac_addr); |
|
|
send_query_peer(eee, scan->mac_addr); |
|
|
scan->last_sent_query = now; |
|
|
scan->last_sent_query = now; |
|
|
return(0); |
|
|
return(0); |
|
|