Fixed 'call' method from jerbob92
This commit is contained in:
parent
046b0ce109
commit
b8d827ed59
3 changed files with 6 additions and 7 deletions
4
Makefile
4
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}
|
||||
|
||||
|
|
8
loop.c
8
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: ");
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue