Debug options
FossilOrigin-Name: 00a884ba50b3a7a8d5e002ab07eef2430a705d60c789fa434a578c8f73920134
This commit is contained in:
parent
d7d52a0a1f
commit
1b80b589b7
2 changed files with 15 additions and 0 deletions
4
Makefile
4
Makefile
|
@ -28,6 +28,10 @@ ifneq ($(strip $(SINGLE_THREADED)),)
|
|||
CFLAGS += -DSINGLE_THREADED
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(SINGLE_THREADED)),)
|
||||
CFLAGS += -DDEBUG
|
||||
endif
|
||||
|
||||
all:
|
||||
$(MAKE) dep_build
|
||||
$(MAKE) filec
|
||||
|
|
11
src/main.c
11
src/main.c
|
@ -54,6 +54,13 @@ static void xs_init (pTHX);
|
|||
|
||||
EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
|
||||
|
||||
#ifdef DEBUG
|
||||
static void exit_treebird(PATH_ARGS)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************
|
||||
* Path handling *
|
||||
******************/
|
||||
|
@ -109,6 +116,10 @@ static struct path_info paths[] = {
|
|||
{ "/tag/:", content_tl_tag },
|
||||
{ "/chats/:", content_chat_view },
|
||||
{ "/chats", content_chats },
|
||||
#ifdef DEBUG
|
||||
{ "/quit", exit_treebird },
|
||||
{ "/exit", exit_treebird },
|
||||
#endif
|
||||
// API
|
||||
{ "/treebird_api/v1/notifications", api_notifications },
|
||||
{ "/treebird_api/v1/interact", api_status_interact },
|
||||
|
|
Loading…
Reference in a new issue