Skip to content

Commit

Permalink
app_softmodem: Don't emit warning if server closes connection.
Browse files Browse the repository at this point in the history
Currently, a warning is emitted when the TCP server closes
the connection, even though this is a legitimate and common
thing to happen.

This is changed to an appropriate verbose message, and we
also take care not to emit this log message multiple times,
since this could also be logged 4 or 5 times before hangup.
  • Loading branch information
InterLinked1 committed Dec 23, 2023
1 parent dbbe4b6 commit 4da9dde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/app_softmodem.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ static int modem_get_bit(void *user_data)
}
return 0; /* return startbit immediately */
} else if (rc == 0) {
ast_log(LOG_WARNING, "Socket seems closed. Will hangup.\n");
if (!tx->session->finished) {
ast_verb(4, "TCP server closed connection, hanging up...\n");
}
tx->session->finished = 1;
}
} else {
Expand Down

0 comments on commit 4da9dde

Please sign in to comment.