mirror of
https://github.com/openssh/libopenssh
synced 2026-04-22 04:36:44 +00:00
remove the last argument from ssh_dispatch_run()
since it's always the same as the first...
This commit is contained in:
@@ -161,7 +161,7 @@ do_authentication2(Authctxt *authctxt)
|
||||
ssh->authctxt = authctxt; /* XXX move to caller */
|
||||
ssh_dispatch_init(ssh, &dispatch_protocol_error);
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_REQUEST, &input_service_request);
|
||||
ssh_dispatch_run(ssh, DISPATCH_BLOCK, &authctxt->success, ssh);
|
||||
ssh_dispatch_run(ssh, DISPATCH_BLOCK, &authctxt->success);
|
||||
ssh->authctxt = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1325,8 +1325,7 @@ client_process_output(fd_set *writeset)
|
||||
static void
|
||||
client_process_buffered_input_packets(void)
|
||||
{
|
||||
dispatch_run(DISPATCH_NONBLOCK, &quit_pending,
|
||||
compat20 ? active_state : NULL);
|
||||
dispatch_run(DISPATCH_NONBLOCK, &quit_pending);
|
||||
}
|
||||
|
||||
/* scan buf[] for '~' before sending data to the peer */
|
||||
|
||||
@@ -77,7 +77,7 @@ ssh_dispatch_set(struct ssh *ssh, int type, dispatch_fn *fn)
|
||||
ssh->dispatch[type] = fn;
|
||||
}
|
||||
void
|
||||
ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done, void *ctxt)
|
||||
ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done)
|
||||
{
|
||||
for (;;) {
|
||||
int type;
|
||||
@@ -91,7 +91,7 @@ ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done, void *c
|
||||
return;
|
||||
}
|
||||
if (type > 0 && type < DISPATCH_MAX && ssh->dispatch[type] != NULL)
|
||||
(*ssh->dispatch[type])(type, seqnr, ctxt);
|
||||
(*ssh->dispatch[type])(type, seqnr, ssh);
|
||||
else
|
||||
ssh_packet_disconnect(ssh, "protocol error: rcvd type %d", type);
|
||||
if (done != NULL && *done)
|
||||
|
||||
@@ -43,13 +43,13 @@ void dispatch_protocol_ignore(int, u_int32_t, struct ssh *);
|
||||
void ssh_dispatch_init(struct ssh *, dispatch_fn *);
|
||||
void ssh_dispatch_set(struct ssh *, int, dispatch_fn *);
|
||||
void ssh_dispatch_range(struct ssh *, u_int, u_int, dispatch_fn *);
|
||||
void ssh_dispatch_run(struct ssh *, int, volatile sig_atomic_t *, void *);
|
||||
void ssh_dispatch_run(struct ssh *, int, volatile sig_atomic_t *);
|
||||
|
||||
#ifdef DISPATCH_COMPAT
|
||||
#define dispatch_init(dflt) ssh_dispatch_init(active_state, (dflt))
|
||||
#define dispatch_range(from, to, fn) ssh_dispatch_range(active_state, (from), (to,) (fn))
|
||||
#define dispatch_set(type, fn) ssh_dispatch_set(active_state, (type), (fn))
|
||||
#define dispatch_run(mode, done, ctxt) ssh_dispatch_run(active_state, (mode), (done), (ctxt))
|
||||
#define dispatch_run(mode, done) ssh_dispatch_run(active_state, (mode), (done))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -506,8 +506,7 @@ drain_output(void)
|
||||
static void
|
||||
process_buffered_input_packets(void)
|
||||
{
|
||||
dispatch_run(DISPATCH_NONBLOCK, NULL, compat20 ? active_state :
|
||||
NULL);
|
||||
dispatch_run(DISPATCH_NONBLOCK, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -244,7 +244,7 @@ keygrab_ssh2(con *c)
|
||||
if (!(j = setjmp(kexjmp))) {
|
||||
nonfatal_fatal = 1;
|
||||
ssh_dispatch_run(active_state, DISPATCH_BLOCK,
|
||||
&active_state->kex->done, active_state);
|
||||
&active_state->kex->done);
|
||||
fprintf(stderr, "Impossible! dispatch_run() returned!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
|
||||
|
||||
ssh->kex = kex;
|
||||
|
||||
ssh_dispatch_run(ssh, DISPATCH_BLOCK, &kex->done, ssh);
|
||||
ssh_dispatch_run(ssh, DISPATCH_BLOCK, &kex->done);
|
||||
|
||||
if (options.use_roaming && !kex->roaming) {
|
||||
debug("Roaming not allowed by server");
|
||||
@@ -396,7 +396,7 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
|
||||
|
||||
ssh_dispatch_init(ssh, &input_userauth_error);
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept);
|
||||
ssh_dispatch_run(ssh, DISPATCH_BLOCK, &authctxt->success, ssh); /* loop until success */
|
||||
ssh_dispatch_run(ssh, DISPATCH_BLOCK, &authctxt->success); /* loop until success */
|
||||
|
||||
pubkey_cleanup(ssh);
|
||||
ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL);
|
||||
|
||||
@@ -2199,7 +2199,7 @@ do_ssh2_kex(void)
|
||||
|
||||
active_state->kex = kex;
|
||||
|
||||
ssh_dispatch_run(active_state, DISPATCH_BLOCK, &kex->done, active_state);
|
||||
ssh_dispatch_run(active_state, DISPATCH_BLOCK, &kex->done);
|
||||
|
||||
session_id2 = kex->session_id;
|
||||
session_id2_len = kex->session_id_len;
|
||||
|
||||
Reference in New Issue
Block a user