-/* $OpenBSD: channels.c,v 1.430 2023/03/10 03:01:51 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.431 2023/06/05 13:24:36 millert Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
/* Used to record timeouts per channel type */
struct ssh_channel_timeout {
char *type_pattern;
- u_int timeout_secs;
+ int timeout_secs;
};
/* Master structure for channels state */
*/
void
channel_add_timeout(struct ssh *ssh, const char *type_pattern,
- u_int timeout_secs)
+ int timeout_secs)
{
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);
sc->timeouts = xrecallocarray(sc->timeouts, sc->ntimeouts,
sc->ntimeouts + 1, sizeof(*sc->timeouts));
sc->ntimeouts = 0;
}
-static u_int
+static int
lookup_timeout(struct ssh *ssh, const char *type)
{
struct ssh_channels *sc = ssh->chanctxt;
-/* $OpenBSD: channels.h,v 1.149 2023/03/04 03:22:59 dtucker Exp $ */
+/* $OpenBSD: channels.h,v 1.150 2023/06/05 13:24:36 millert Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
/* Last traffic seen for OPEN channels */
time_t lastused;
/* Inactivity timeout deadline in seconds (0 = no timeout) */
- u_int inactive_deadline;
+ int inactive_deadline;
};
#define CHAN_EXTENDED_IGNORE 0
void channel_send_window_changes(struct ssh *);
/* channel inactivity timeouts */
-void channel_add_timeout(struct ssh *, const char *, u_int);
+void channel_add_timeout(struct ssh *, const char *, int);
void channel_clear_timeouts(struct ssh *);
/* mux proxy support */
-/* $OpenBSD: servconf.c,v 1.393 2023/05/24 23:01:06 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.394 2023/06/05 13:24:36 millert Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
/* Parse a ChannelTimeout clause "pattern=interval" */
static int
-parse_timeout(const char *s, char **typep, u_int *secsp)
+parse_timeout(const char *s, char **typep, int *secsp)
{
char *cp, *sdup;
int secs;
if (typep != NULL)
*typep = xstrdup(sdup);
if (secsp != NULL)
- *secsp = (u_int)secs;
+ *secsp = secs;
free(sdup);
return 0;
}
void
process_channel_timeouts(struct ssh *ssh, ServerOptions *options)
{
- u_int i, secs;
+ int secs;
+ u_int i;
char *type;
debug3_f("setting %u timeouts", options->num_channel_timeouts);