mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-01 19:20:05 +00:00
fix negative number in printf
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9620 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8c2ab90734
commit
22467e38d6
@ -1376,7 +1376,12 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
|
||||
switch_assert(gp->state < REG_STATE_LAST);
|
||||
stream->write_function(stream, "%25s\t%s\t %32s\t%s", gp->name, "gateway", gp->register_to, sofia_state_names[gp->state]);
|
||||
if (gp->state == REG_STATE_FAILED || gp->state == REG_STATE_TRYING) {
|
||||
stream->write_function(stream, " (retry: %ds)", gp->retry - switch_timestamp(NULL));
|
||||
time_t now = switch_timestamp(NULL);
|
||||
if (gp->retry > now) {
|
||||
stream->write_function(stream, " (retry: %ds)", gp->retry - now);
|
||||
} else {
|
||||
stream->write_function(stream, " (retry: NEVER)");
|
||||
}
|
||||
}
|
||||
stream->write_function(stream, "\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user