Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion can.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ static int can_send_break(struct ios_ops *ios)
static void can_exit(struct ios_ops *ios)
{
close(ios->fd);
free(ios);
}

struct ios_ops *can_init(char *interface_id)
Expand Down
2 changes: 2 additions & 0 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ static int cmd_break(int argc, char *argv[])

static int cmd_quit(int argc, char *argv[])
{
fflush(NULL);
microcom_exit(0);
exit(0);
return 0;
}

Expand Down
7 changes: 4 additions & 3 deletions microcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ void restore_terminal(void)

void microcom_exit(int signal)
{
printf("exiting\n");
write(1, "exiting\n", 8);

ios->exit(ios);
tcsetattr(STDIN_FILENO, TCSANOW, &sots);

exit(0);
if (signal)
_Exit(0);
}

/********************************************************************
Expand Down Expand Up @@ -122,7 +123,7 @@ char escape_char = DEFAULT_ESCAPE_CHAR;

int main(int argc, char *argv[])
{
struct sigaction sact; /* used to initialize the signal handler */
struct sigaction sact = {0}; /* used to initialize the signal handler */
int opt, ret;
char *hostport = NULL;
int telnet = 0, can = 0;
Expand Down
1 change: 0 additions & 1 deletion serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ static void serial_exit(struct ios_ops *ios)
{
tcsetattr(ios->fd, TCSANOW, &pots);
close(ios->fd);
free(ios);
}

struct ios_ops * serial_init(char *device)
Expand Down
1 change: 0 additions & 1 deletion telnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ static int telnet_send_break(struct ios_ops *ios)
static void telnet_exit(struct ios_ops *ios)
{
close(ios->fd);
free(ios);
}

struct ios_ops *telnet_init(char *hostport)
Expand Down
Loading