示例#1
0
void
conn_status (void)
{
    arla_log(ADEBVLOG, "%u(%u) connections",
	     nactive_connections, nconnections);
    hashtabforeach (connhtab, print_conn, NULL);
}
示例#2
0
文件: symbol.c 项目: aosm/Heimdal
int
checksymbols(void)
{
    int f = 0;
    hashtabforeach(htab, checkfunc, &f);
    return f;
}
示例#3
0
static int
test_hash(void)
{
    Hashtab *h;

    starttesting("hashtab");

    h = hashtabnew(100, hash_cmp, hash_hash);
    if (!h)
	return endtesting(1);

    if (!hashtabadd(h, "one")||
	!hashtabadd(h, "two")||
	!hashtabadd(h, "three")||
	!hashtabadd(h, "four"))
	return endtesting(1);

    printf("foreach ----\n");
    hashtabforeach(h, hash_print, NULL);

    printf("search ----\none == %s\ntwo == %s\nthree == %s\nfour == %s\n", 
	   (char *)hashtabsearch(h, "one"),
	   (char *)hashtabsearch(h, "two"),
	   (char *)hashtabsearch(h, "three"),
	   (char *)hashtabsearch(h, "four"));

    hashtabrelease(h);

    return endtesting(0);
}
示例#4
0
文件: symbol.c 项目: 0x24bin/winexe-1
int
checkundefined(void)
{
    int f = 0;
    hashtabforeach(htab, checkfunc, &f);
    return f;
}
示例#5
0
static void
debug_print_callbacks (void)
{
    if (debuglevel & MDEBROPA) {
	mlog_log (MDEBROPA, "---callbacks left are---");
	
	hashtabforeach (ht_callbacks, print_callback_sub, NULL);
    }
}
示例#6
0
void
conn_clearcred(clear_state_mask mask,
	       int32_t cell, nnpfs_pag_t cred, int securityindex)
{
    struct clear_state s;

    s.mask	    = mask;
    s.cell          = cell;
    s.cred          = cred;
    s.securityindex = securityindex;

    hashtabforeach (connhtab, clear_cred, (void *)&s);
}
示例#7
0
void
conn_downhosts(int32_t cell, uint32_t *hosts, int *num, int flags)
{
    struct down_state s;

    if (*num == 0)
	return;

    s.cell          = cell;
    s.hosts	    = hosts;
    s.len           = *num;
    s.i	            = 0;
    s.flags         = flags;

    hashtabforeach (connhtab, host_down, (void *)&s);

    *num = s.i;
}
示例#8
0
static ConnCacheEntry *
get_free_connection (void)
{
    ConnCacheEntry *e;

    e = (ConnCacheEntry *)listdelhead (connfreelist);
    if (e != NULL)
	return e;

    hashtabforeach (connhtab, clear_conn, NULL);

    e = (ConnCacheEntry *)listdelhead (connfreelist);
    if (e != NULL)
	return e;

    create_new_connections (CONNFREELISTINC);

    e = (ConnCacheEntry *)listdelhead (connfreelist);
    if (e != NULL)
	return e;

    arla_errx (1, ADEBERROR,
	       "conncache: there was no way of getting a connection");
}