Author: jschultz
Date: 2005-08-09 22:07:49 -0400 (Tue, 09 Aug 2005)
New Revision: 264
Modified:
trunk/daemon/groups.c
trunk/flush/fl.c
trunk/stdutil/src/stdarr.c
trunk/stdutil/src/stdcarr.c
trunk/stdutil/src/stddll.c
trunk/stdutil/src/stdhash.c
Log:
Fixed bugs of omission in stdutil: somehow got left out in last check in. Fixed two minor bugs (that I introduced) in groups.c, one was an improper skiplist erase and the other was improperly reporting # of target sessions in G_analize groups. The flush change was just white space.
Modified: trunk/daemon/groups.c
===================================================================
--- trunk/daemon/groups.c 2005-08-08 21:21:13 UTC (rev 263)
+++ trunk/daemon/groups.c 2005-08-10 02:07:49 UTC (rev 264)
@@ -1063,7 +1063,7 @@
Alarmp( SPLOG_FATAL, GROUPS, "G_handle_kill: unable to extract member(%s) from MembersList!\n", private_group_name );
}
- stdskl_erase_key(&dmn->MembersList, &tit);
+ stdskl_erase(&dmn->MembersList, &tit);
dispose(mbr);
grp->num_members--;
@@ -2240,6 +2240,7 @@
int ses;
int ret;
int i;
+ int *orig_target_sessions = target_sessions;
/* collect the target local mailboxen */
@@ -2323,7 +2324,7 @@
*target_sessions = Sess_get_session_index( *bigbox_ptr );
}
- return (int) (bigend_ptr - bigbox_ptr);
+ return (int) (target_sessions - orig_target_sessions);
}
static void G_compute_group_mask( group *grp, char *func_name )
Modified: trunk/flush/fl.c
===================================================================
--- trunk/flush/fl.c 2005-08-08 21:21:13 UTC (rev 263)
+++ trunk/flush/fl.c 2005-08-10 02:07:49 UTC (rev 264)
@@ -1932,10 +1932,10 @@
err = scatp_set(&pos, scat, offset, SEEK_SET);
assert(err == offset);
- err = scatp_cpy1((char*) &num_membs, &pos, sizeof(stduint32)); /* read out num membs */
+ err = scatp_cpy1((char*) &num_membs, &pos, sizeof(stduint32)); /* read out num membs */
assert(err == sizeof(stduint32));
- err = scatp_jforward(&pos, sizeof(stduint32)); /* advance to vs_set */
+ err = scatp_jforward(&pos, sizeof(stduint32)); /* advance to vs_set */
assert(err == sizeof(stduint32));
if (!Is_caused_network_mess(*m->serv_type)) { /* join, leave, or disconnection */
Modified: trunk/stdutil/src/stdarr.c
===================================================================
--- trunk/stdutil/src/stdarr.c 2005-08-08 21:21:13 UTC (rev 263)
+++ trunk/stdutil/src/stdarr.c 2005-08-10 02:07:49 UTC (rev 264)
@@ -270,6 +270,7 @@
{
STDSAFETY_CHECK(STDARR_IS_LEGAL(arr));
+ it->type_id = STDARR_IT_ID;
it->impl.arr.val = (char*) arr->begin;
it->impl.arr.vsize = arr->vsize;
@@ -295,6 +296,7 @@
{
STDSAFETY_CHECK(STDARR_IS_LEGAL(arr));
+ it->type_id = STDARR_IT_ID;
it->impl.arr.val = (char*) arr->end;
it->impl.arr.vsize = arr->vsize;
Modified: trunk/stdutil/src/stdcarr.c
===================================================================
--- trunk/stdutil/src/stdcarr.c 2005-08-08 21:21:13 UTC (rev 263)
+++ trunk/stdutil/src/stdcarr.c 2005-08-10 02:07:49 UTC (rev 264)
@@ -609,6 +609,7 @@
{
STDSAFETY_CHECK(STDCARR_IS_LEGAL(carr));
+ it->type_id = STDCARR_IT_ID;
it->impl.carr.val = (char*) carr->begin;
it->impl.carr.base = (char*) carr->base;
it->impl.carr.endbase = (char*) carr->endbase;
@@ -637,7 +638,8 @@
STDINLINE stdit *stdcarr_end(const stdcarr *carr, stdit *it)
{
STDSAFETY_CHECK(STDCARR_IS_LEGAL(carr));
-
+
+ it->type_id = STDCARR_IT_ID;
it->impl.carr.val = (char*) carr->end;
it->impl.carr.base = (char*) carr->base;
it->impl.carr.endbase = (char*) carr->endbase;
Modified: trunk/stdutil/src/stddll.c
===================================================================
--- trunk/stdutil/src/stddll.c 2005-08-08 21:21:13 UTC (rev 263)
+++ trunk/stdutil/src/stddll.c 2005-08-10 02:07:49 UTC (rev 264)
@@ -362,6 +362,7 @@
{
STDSAFETY_CHECK(STDDLL_IS_LEGAL(l));
+ it->type_id = STDDLL_IT_ID;
it->impl.dll.node = (stddll_node*) STDDLL_LBEGIN(l);
it->impl.dll.end_node = (stddll_node*) STDDLL_LEND(l);
it->impl.dll.vsize = l->vsize;
@@ -388,6 +389,7 @@
{
STDSAFETY_CHECK(STDDLL_IS_LEGAL(l));
+ it->type_id = STDDLL_IT_ID;
it->impl.dll.node = (stddll_node*) STDDLL_LEND(l);
it->impl.dll.end_node = (stddll_node*) STDDLL_LEND(l);
it->impl.dll.vsize = l->vsize;
Modified: trunk/stdutil/src/stdhash.c
===================================================================
--- trunk/stdutil/src/stdhash.c 2005-08-08 21:21:13 UTC (rev 263)
+++ trunk/stdutil/src/stdhash.c 2005-08-10 02:07:49 UTC (rev 264)
@@ -534,14 +534,10 @@
}
}
- if (first_ins == NULL) { /* empty input sequence, set 'it' to end */
- first_ins = h->table_end;
- }
-
stdhash_low_insert_end:
- if (first_ins != NULL && it != NULL) { /* at least one insertion succeeded/empty input sequence */
+ if (it != NULL) { /* at least one insertion succeeded/empty input sequence */
it->type_id = STDHASH_IT_ID;
- it->impl.hash.node_pos = first_ins;
+ it->impl.hash.node_pos = (first_ins != NULL ? first_ins : h->table_end);
it->impl.hash.table = h->table;
it->impl.hash.table_end = h->table_end;
it->impl.hash.ksize = h->ksize;
@@ -738,6 +734,7 @@
{
STDSAFETY_CHECK(STDHASH_IS_LEGAL(h));
+ it->type_id = STDHASH_IT_ID;
it->impl.hash.node_pos = (stdhash_node**) h->begin;
it->impl.hash.table = (stdhash_node**) h->table;
it->impl.hash.table_end = (stdhash_node**) h->table_end;
@@ -767,6 +764,7 @@
{
STDSAFETY_CHECK(STDHASH_IS_LEGAL(h));
+ it->type_id = STDHASH_IT_ID;
it->impl.hash.node_pos = (stdhash_node**) h->table_end;
it->impl.hash.table = (stdhash_node**) h->table;
it->impl.hash.table_end = (stdhash_node**) h->table_end;
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.