Skip to content

Commit

Permalink
fixup couchbase#7
Browse files Browse the repository at this point in the history
Change-Id: Id4eb4e8f7bafdced0661f8bf4338f91925cce27d
  • Loading branch information
mnunberg committed Feb 1, 2014
1 parent 6f37615 commit 8d397b6
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/connmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ typedef struct connmgr_cinfo_st {

static void on_idle_timeout(lcb_timer_t tm, lcb_t instance, const void *cookie);
static void he_available_notify(lcb_timer_t tm, lcb_t i, const void *cookie);
static void he_dump(connmgr_hostent *he, FILE *out);

static void destroy_cinfo(connmgr_cinfo *info)
{
Expand Down Expand Up @@ -455,17 +456,10 @@ static void write_he_list(lcb_clist_t *ll, FILE *out)

}

static void dumpfunc(const void *k, lcb_size_t nk, const void *v, lcb_size_t nv,
void *arg)
static void he_dump(connmgr_hostent *he, FILE *out)
{
FILE *out = (FILE *)arg;
connmgr_hostent *he = (connmgr_hostent *)v;
lcb_list_t *llcur;

(void)nv;


fprintf(out, "HOST=%.*s ", (int)nk, (char *)k);
fprintf(out, "HOST=%s", he->key);
fprintf(out, "Requests=%d, Idle=%d, Pending=%d, Leased=%d\n",
(int)HE_NREQS(he),
(int)HE_NIDLE(he),
Expand Down Expand Up @@ -496,6 +490,16 @@ static void dumpfunc(const void *k, lcb_size_t nk, const void *v, lcb_size_t nv,
}

fprintf(out, "\n");

}

static void dumpfunc(const void *k, lcb_size_t nk, const void *v, lcb_size_t nv,
void *arg)
{
FILE *out = (FILE *)arg;
connmgr_hostent *he = (connmgr_hostent *)v;
he_dump(he, out);
(void)nk;(void)k;(void)nv;
}

/**
Expand Down

0 comments on commit 8d397b6

Please sign in to comment.