[Spread-cvs] commit: r638 - branches/experimental-4.3-threaded/daemon
jschultz at spread.org
jschultz at spread.org
Mon Jan 13 15:19:50 EST 2014
Author: jschultz
Date: 2014-01-13 15:19:50 -0500 (Mon, 13 Jan 2014)
New Revision: 638
Modified:
branches/experimental-4.3-threaded/daemon/session.c
Log:
Trying to figure out membership configurations + debug
Modified: branches/experimental-4.3-threaded/daemon/session.c
===================================================================
--- branches/experimental-4.3-threaded/daemon/session.c 2014-01-13 18:22:18 UTC (rev 637)
+++ branches/experimental-4.3-threaded/daemon/session.c 2014-01-13 20:19:50 UTC (rev 638)
@@ -1975,7 +1975,7 @@
memb_obj *m = (memb_obj*) obj_link->mess;
G_handle_reg_memb( m->memb, m->memb_id );
- dispose(m->memb.allprocs);
+ /*dispose(m->memb.allprocs);*/
goto END;
}
@@ -1983,7 +1983,7 @@
memb_obj *t = (memb_obj*) obj_link->mess;
G_handle_trans_memb( t->memb, t->memb_id );
- dispose(t->memb.allprocs);
+ /*dispose(t->memb.allprocs);*/
goto END;
}
@@ -2091,6 +2091,9 @@
Alarm(EXIT, "Sess_deliver_reg_memb: failed to create object!\n");
}
+ m->memb = reg_memb;
+
+ /*
m->memb.allprocs = Mem_alloc( MAX_PROCS_RING * sizeof( proc ) );
if (m->memb.allprocs == NULL) {
@@ -2098,6 +2101,8 @@
}
Conf_config_copy(®_memb, &m->memb);
+ */
+
m->memb_id = reg_memb_id;
obj->type = REG_MEMB_MESS;
@@ -2137,18 +2142,31 @@
{
obj_link *obj = new(OBJ_LINK);
memb_obj *t = new(MEMB_OBJ);
+ int i, j;
if (obj == NULL || t == NULL) {
Alarm(EXIT, "Sess_deliver_trans_memb: failed to create object!\n");
}
- t->memb.allprocs = Mem_alloc( MAX_PROCS_RING * sizeof( proc ) );
+ t->memb = trans_memb;
- if (t->memb.allprocs == NULL) {
- Alarm(EXIT, "Sess_deliver_trans_memb: failed to create allprocs!\n");
+ if (trans_memb.allprocs != NULL) {
+ t->memb.allprocs = Mem_alloc( MAX_PROCS_RING * sizeof( proc ) );
+
+ if (t->memb.allprocs == NULL) {
+ Alarm(EXIT, "Sess_deliver_trans_memb: failed to create allprocs!\n");
+ }
+
+ memcpy(t->memb.allprocs, trans_memb.allprocs, MAX_PROCS_RING * sizeof( proc ) );
+
+ for (i = 0; i < MAX_SEGMENTS; ++i) {
+ for (j = 0; j < MAX_PROCS_SEGMENT; ++j) {
+ t->memb.segments[i].procs[j] = t->memb.allprocs + (trans_memb.segments[i].procs[j] - trans_memb.allprocs);
+ }
+ }
}
- Conf_config_copy(&trans_memb, &t->memb);
+ /*Conf_config_copy(&trans_memb, &t->memb);*/
t->memb_id = trans_memb_id;
obj->type = TRANSITION_MESS;
More information about the Spread-cvs
mailing list