Skip to content

Commit 4da9dde

Browse files
committed
app_softmodem: Don't emit warning if server closes connection.
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.
1 parent dbbe4b6 commit 4da9dde

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/app_softmodem.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,9 @@ static int modem_get_bit(void *user_data)
468468
}
469469
return 0; /* return startbit immediately */
470470
} else if (rc == 0) {
471-
ast_log(LOG_WARNING, "Socket seems closed. Will hangup.\n");
471+
if (!tx->session->finished) {
472+
ast_verb(4, "TCP server closed connection, hanging up...\n");
473+
}
472474
tx->session->finished = 1;
473475
}
474476
} else {

0 commit comments

Comments
 (0)