atd

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/atd
Log | Files | Refs

commit 776e00888760d78ddf2ac202d1961efa0e21d24f
parent eee7b082dfb1652b920f7d800d7ee33d5a2107cd
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Fri,  9 Jul 2021 18:48:09 -0500

atd: add startup command

Diffstat:
Matd.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/atd.c b/atd.c @@ -39,6 +39,8 @@ #define BUFSIZE 256 +char *startup = "AT+CLIP=1\r"; + struct command_args cmddata[] = { [CMD_DIAL] = { ATD, { TYPE_STRING, TYPE_NONE} }, [CMD_ANSWER] = { ATA, { TYPE_NONE} }, @@ -431,6 +433,9 @@ int main(int argc, char *argv[]) fds[SIGNALINT].fd = sigintfd; fds[SIGNALINT].events = POLLIN; + if (xwrite(backsock, startup, sizeof(startup)) == -1) + goto error; + while (true) { if (poll(fds, sizeof(fds) / sizeof(fds[0]), -1) == -1) { warn("poll failed");