diff --git a/Makefile b/Makefile index 014677c..bc91bb0 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ srcdir=. -CFLAGS=-g -O2 +CFLAGS=-g -O2 -I/usr/include/lua5.2 LDFLAGS= CPPFLAGS= DEFS=-DHAVE_CONFIG_H COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -EXTRA_LIBS=-lconfig -lcrypto -lz -lrt -lm -lreadline -llua +EXTRA_LIBS=-lconfig -lcrypto -lz -lm -lreadline -llua5.2 -ldl LOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS} LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS} diff --git a/loop.c b/loop.c index 3cce8e3..fe2c211 100644 --- a/loop.c +++ b/loop.c @@ -517,13 +517,13 @@ int loop (void) { do_send_code (default_username); char *code = 0; size_t size = 0; - printf ("Code from sms (if you did not receive an SMS and want to be called, type 0): "); + printf ("Code from sms (if you did not receive an SMS and want to be called, type \"call\"): "); while (1) { if (net_getline (&code, &size) == -1) { perror ("getline()"); exit (EXIT_FAILURE); } - if (*code == '0') { + if (!strcmp (code, "call")) { printf ("You typed 0, switching to phone system.\n"); do_phone_call (default_username); printf ("Calling you! Code: "); @@ -569,13 +569,13 @@ int loop (void) { DC_working = DC_list[dc_working_num]; do_send_code (default_username); - printf ("Code from sms (if you did not receive an SMS and want to be called, type 0): "); + printf ("Code from sms (if you did not receive an SMS and want to be called, type \"call\"): "); while (1) { if (net_getline (&code, &size) == -1) { perror ("getline()"); exit (EXIT_FAILURE); } - if (*code == '0') { + if (!strcmp (code, "call")) { printf ("You typed 0, switching to phone system.\n"); do_phone_call (default_username); printf ("Calling you! Code: "); diff --git a/queries.c b/queries.c index f7aa8e3..426a5d5 100644 --- a/queries.c +++ b/queries.c @@ -472,7 +472,6 @@ void do_send_code (const char *user) { int phone_call_on_answer (struct query *q UU) { fetch_bool (); - assert(1); return 0; }