git://git.onelab.eu
/
distributedratelimiting.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Long-outstanding commit. (Hopefully) Final version before running experiments for...
[distributedratelimiting.git]
/
drl
/
peer_comm.c
diff --git
a/drl/peer_comm.c
b/drl/peer_comm.c
index
2da6737
..
eba9637
100644
(file)
--- a/
drl/peer_comm.c
+++ b/
drl/peer_comm.c
@@
-391,7
+391,9
@@
static void ident_receive(comm_ident_t *ident, pthread_rwlock_t *limiter_rwlock)
}
#endif
}
#endif
-#define ALLOW_PARTITION
+/* Turn this on to simulate network partitions.
+ * Turn off for production settings. */
+//#define ALLOW_PARTITION
int send_udp_mesh(comm_t *comm, uint32_t id, int sock) {
int result = 0;
int send_udp_mesh(comm_t *comm, uint32_t id, int sock) {
int result = 0;
@@
-440,6
+442,8
@@
int send_udp_mesh(comm_t *comm, uint32_t id, int sock) {
}
}
}
}
+ partition_count += 1;
+
#endif
toaddr.sin_addr.s_addr = remote->addr; /* Already in network byte order. */
#endif
toaddr.sin_addr.s_addr = remote->addr; /* Already in network byte order. */
@@
-450,7
+454,6
@@
int send_udp_mesh(comm_t *comm, uint32_t id, int sock) {
printlog(LOG_WARN, " - The error was |%d|\n", strerror(result));
break;
}
printlog(LOG_WARN, " - The error was |%d|\n", strerror(result));
break;
}
- partition_count += 1;
}
return result;
}
return result;