diff options
author | Laurent Ghigonis <laurent@p1sec.com> | 2012-12-13 03:58:22 +0100 |
---|---|---|
committer | Laurent Ghigonis <laurent@p1sec.com> | 2012-12-13 03:58:22 +0100 |
commit | f2fbebeae7f06964e866de41d908bbe817d47ece (patch) | |
tree | 2217f42381f9422a4636cc2154ed6da463f24b24 /libglouglou | |
parent | update last seen date on nodes too when we receive data (diff) | |
download | glouglou-f2fbebeae7f06964e866de41d908bbe817d47ece.tar.xz glouglou-f2fbebeae7f06964e866de41d908bbe817d47ece.zip |
init connids only if we manage them
Diffstat (limited to 'libglouglou')
-rw-r--r-- | libglouglou/libggnet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libglouglou/libggnet.c b/libglouglou/libggnet.c index 6512ef9..9c6314e 100644 --- a/libglouglou/libggnet.c +++ b/libglouglou/libggnet.c @@ -12,8 +12,9 @@ ggnet_new(int manage_connid) net = xcalloc(1, sizeof(struct ggnet)); net->manage_connid = manage_connid; - for (i=0; i<GGNET_CONN_FREEIDS_COUNT-1; i++) - net->conn_freeids[i] = i; + if (manage_connid) + for (i=0; i<GGNET_CONN_FREEIDS_COUNT-1; i++) + net->conn_freeids[i] = i; return net; } |