summaryrefslogtreecommitdiffstats
path: root/src/h.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/h.c')
-rw-r--r--src/h.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/h.c b/src/h.c
index 83fafd8..04fb7e9 100644
--- a/src/h.c
+++ b/src/h.c
@@ -668,6 +668,8 @@ enum dc_status dc_handle_ping (struct dc_api_io io, void * userdata) { /* tries
continue;
if (!pass->wsi)
continue;
+ fprintf(stderr, "dc_handle_ping: interval %lu last %lu\n",
+ client->ping_interval, client->last_ping);
if (!userdata) { /* so packet parser iow server may request an immediate ping */
if (client->ping_interval && client->last_ping + client->ping_interval < time(NULL))
client->last_ping = time(NULL);
@@ -753,7 +755,8 @@ void dc_api_stack (struct dc_api_io);
struct dc_##x * us; \
assert(u); \
if ((us = dc_find_##x(*p, *l, u->id))) { \
- /* fprintf(stderr, "debug: %s found already existing member\n", __func__); */ \
+ if (getenv("DC_I")) \
+ fprintf(stderr, "debug: %s found already existing member\n", __func__); \
if (us == u) \
return us; \
if (s & DC_REPLACE) { \
@@ -772,7 +775,8 @@ void dc_api_stack (struct dc_api_io);
*so = ceil(*so*DC_REALLOC_K); \
*p = realloc(*p, sizeof(**p) * *so); \
} \
- /* fprintf(stderr, "debug: %s inserted into ISA\n", __func__); */ /* too much */ \
+ if (getenv("DC_I")) \
+ fprintf(stderr, "debug: %s inserted into ISA\n", __func__); \
(*p)[(*l)++] = u; \
return u; \
}