version 1.430, 2023/03/10 03:01:51 |
version 1.431, 2023/06/05 13:24:36 |
|
|
/* Used to record timeouts per channel type */ |
/* Used to record timeouts per channel type */ |
struct ssh_channel_timeout { |
struct ssh_channel_timeout { |
char *type_pattern; |
char *type_pattern; |
u_int timeout_secs; |
int timeout_secs; |
}; |
}; |
|
|
/* Master structure for channels state */ |
/* Master structure for channels state */ |
|
|
*/ |
*/ |
void |
void |
channel_add_timeout(struct ssh *ssh, const char *type_pattern, |
channel_add_timeout(struct ssh *ssh, const char *type_pattern, |
u_int timeout_secs) |
int timeout_secs) |
{ |
{ |
struct ssh_channels *sc = ssh->chanctxt; |
struct ssh_channels *sc = ssh->chanctxt; |
|
|
debug2_f("channel type \"%s\" timeout %u seconds", |
debug2_f("channel type \"%s\" timeout %d seconds", |
type_pattern, timeout_secs); |
type_pattern, timeout_secs); |
sc->timeouts = xrecallocarray(sc->timeouts, sc->ntimeouts, |
sc->timeouts = xrecallocarray(sc->timeouts, sc->ntimeouts, |
sc->ntimeouts + 1, sizeof(*sc->timeouts)); |
sc->ntimeouts + 1, sizeof(*sc->timeouts)); |
|
|
sc->ntimeouts = 0; |
sc->ntimeouts = 0; |
} |
} |
|
|
static u_int |
static int |
lookup_timeout(struct ssh *ssh, const char *type) |
lookup_timeout(struct ssh *ssh, const char *type) |
{ |
{ |
struct ssh_channels *sc = ssh->chanctxt; |
struct ssh_channels *sc = ssh->chanctxt; |