diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-01-10 22:59:38 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-01-10 22:59:38 +0000 |
commit | f09a013c9e7c235b26086e3d5ff024cb281ee30f (patch) | |
tree | 671f3f8dcd832bbd09f5bbf7ea58c6c088bde493 /src | |
parent | 6a1211c9642e6018e6548c2a47bd666c60cc442d (diff) |
final 0.3
git-svn-id: file:///home/lennart/svn/public/ivcall/trunk@15 e0b13411-74c3-0310-b366-a0654dd0340f
Diffstat (limited to 'src')
-rw-r--r-- | src/ivcall.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ivcall.c b/src/ivcall.c index 5aca741..28cf890 100644 --- a/src/ivcall.c +++ b/src/ivcall.c @@ -391,10 +391,18 @@ int go(void) { goto fail; } - snprintf(buf, sizeof(buf), "AT&L%s\n", source_msn); - if (tty_command(fd, buf, "OK\r\n", COMMAND_TIMEOUT) < 0) { - fprintf(stderr, "Initialisation failure.\n"); - goto fail; + if (answer) { + snprintf(buf, sizeof(buf), "AT&L%s\n", source_msn); + if (tty_command(fd, buf, "OK\r\n", COMMAND_TIMEOUT) < 0) { + fprintf(stderr, "Initialisation failure.\n"); + goto fail; + } + } else { + snprintf(buf, sizeof(buf), "AT&E%s\n", source_msn); + if (tty_command(fd, buf, "OK\r\n", COMMAND_TIMEOUT) < 0) { + fprintf(stderr, "Initialisation failure.\n"); + goto fail; + } } if (answer) |