summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-10-12 17:44:36 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-10-12 17:44:36 +0200
commit36b89517affd96c9e323af9a4e6e88c8f0938caf (patch)
tree4a1f9ffc324c37bef728e1610a2fb91e78ae6122 /src/ipcpd/normal
parent1ee129f4479b1910afc929f24bb70b8bc6478f01 (diff)
parent3a650d07d2d7540ebee65cef58b35f0373ad14d6 (diff)
downloadouroboros-36b89517affd96c9e323af9a4e6e88c8f0938caf.tar.gz
ouroboros-36b89517affd96c9e323af9a4e6e88c8f0938caf.zip
Merge branch 'testing' into be
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r--src/ipcpd/normal/dht.c2
-rw-r--r--src/ipcpd/normal/pol/link_state.c9
2 files changed, 5 insertions, 6 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index aa1909e9..0ad9d9a7 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2729,7 +2729,7 @@ static void handle_event(void * self,
pthread_t thr;
struct join_info * inf;
struct conn * c = (struct conn *) o;
- struct timespec slack = {0, 10 * MILLION};
+ struct timespec slack = {0, DHT_ENROLL_SLACK * MILLION};
/* Give the pff some time to update for the new link. */
nanosleep(&slack, NULL);
diff --git a/src/ipcpd/normal/pol/link_state.c b/src/ipcpd/normal/pol/link_state.c
index e8677f0d..5f592edf 100644
--- a/src/ipcpd/normal/pol/link_state.c
+++ b/src/ipcpd/normal/pol/link_state.c
@@ -789,16 +789,15 @@ static void handle_event(void * self,
switch (event) {
case NOTIFY_DT_CONN_ADD:
+ pthread_rwlock_rdlock(&ls.db_lock);
+ send_lsm(ipcpi.dt_addr, c->conn_info.addr, 0);
+ pthread_rwlock_unlock(&ls.db_lock);
+
if (lsdb_add_nb(c->conn_info.addr, c->flow_info.fd, NB_DT))
log_dbg("Failed to add neighbor to LSDB.");
if (lsdb_add_link(ipcpi.dt_addr, c->conn_info.addr, 0, &qs))
log_dbg("Failed to add new adjacency to LSDB.");
-
- pthread_rwlock_rdlock(&ls.db_lock);
- send_lsm(ipcpi.dt_addr, c->conn_info.addr, 0);
- pthread_rwlock_unlock(&ls.db_lock);
-
break;
case NOTIFY_DT_CONN_DEL:
flow_event(c->flow_info.fd, false);