remove debug code from client and library
This commit is contained in:
@@ -25,7 +25,11 @@
|
||||
#include <dc/refable.h>
|
||||
#include <dc/account.h>
|
||||
|
||||
#define DEBUG
|
||||
/* For internal debugging only. Please note that the client will then begin to
|
||||
* write text files everywhere filled with all sorts of private information. Use
|
||||
* with caution.
|
||||
*/
|
||||
/*#define DEBUG*/
|
||||
|
||||
#define return_if_true(v,r) do { if (v) return r; } while(0)
|
||||
#define goto_if_true(v,l) do { if (v) goto l; } while(0)
|
||||
|
||||
@@ -182,12 +182,14 @@ static void dc_session_handler(dc_gateway_t gw, dc_event_t e, void *p)
|
||||
h(s, e);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
char *str = NULL;
|
||||
str = json_dumps(dc_event_payload(e), 0);
|
||||
FILE *f = fopen("events.txt", "a+");
|
||||
fprintf(f, "%s: %s\n", dc_event_type(e), str);
|
||||
free(str);
|
||||
fclose(f);
|
||||
#endif
|
||||
}
|
||||
|
||||
dc_session_t dc_session_new(dc_loop_t loop)
|
||||
|
||||
Reference in New Issue
Block a user