Commit a5b6f93a authored by vysheng's avatar vysheng

Fixed 'call' method from jerbob92

parent f6fe5765
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}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment