diff options
author | Uros Majstorovic <majstor@majstor.org> | 2017-09-06 18:19:00 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2017-09-06 18:19:00 +0200 |
commit | c129b10bf7c851d94002767aa09e06c526cacb7d (patch) | |
tree | a0ca2c8d603a233c43c888dddb4ee541d4ba34e5 /code/vconn | |
parent | b83e58e21ea7dda57ddfda47bd1539d15abe687f (diff) |
frad/defrag implemented
Diffstat (limited to 'code/vconn')
-rw-r--r-- | code/vconn/vconn.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/code/vconn/vconn.c b/code/vconn/vconn.c index 4eebb62..740f400 100644 --- a/code/vconn/vconn.c +++ b/code/vconn/vconn.c @@ -483,6 +483,7 @@ int ecp_vconn_init(ECPConnection *conn, ECPNode *conn_node, ECPVConnection vconn if (rv) return rv; conn->parent = (ECPConnection *)&vconn[size-1]; + conn->pcount = size; for (i=0; i<size; i++) { rv = ecp_conn_create((ECPConnection *)&vconn[i], sock, ECP_CTYPE_VCONN); if (rv) return rv; @@ -495,7 +496,9 @@ int ecp_vconn_init(ECPConnection *conn, ECPNode *conn_node, ECPVConnection vconn } else { vconn[i].b.parent = (ECPConnection *)&vconn[i-1]; } - if (i == size-1) { + vconn[i].b.pcount = i; + + if (i == size - 1) { vconn[i].next = conn; } else { vconn[i].next = (ECPConnection *)&vconn[i+1]; |