Don't shadow existing variables. No functional changes.
This commit is contained in:
parent
16761c8c29
commit
8ed9644253
1 changed files with 14 additions and 14 deletions
|
@ -307,12 +307,12 @@ int
|
||||||
execute(void)
|
execute(void)
|
||||||
{
|
{
|
||||||
s_char buf[512];
|
s_char buf[512];
|
||||||
int abort;
|
int failed;
|
||||||
s_char *p;
|
s_char *p;
|
||||||
s_char *redir;
|
s_char *redir;
|
||||||
s_char scanspace[1024];
|
s_char scanspace[1024];
|
||||||
|
|
||||||
abort = 0;
|
failed = 0;
|
||||||
redir = 0;
|
redir = 0;
|
||||||
|
|
||||||
p = getstarg(player->argp[1], "File? ", buf);
|
p = getstarg(player->argp[1], "File? ", buf);
|
||||||
|
@ -321,24 +321,24 @@ execute(void)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
||||||
prexec(player->argp[1]);
|
prexec(player->argp[1]);
|
||||||
while (!abort && status()) {
|
while (!failed && status()) {
|
||||||
if (recvclient(buf, sizeof(buf)) < 0)
|
if (recvclient(buf, sizeof(buf)) < 0)
|
||||||
break;
|
break;
|
||||||
if (parse(buf, player->argp, &player->condarg,
|
if (parse(buf, player->argp, &player->condarg,
|
||||||
scanspace, &redir) < 0) {
|
scanspace, &redir) < 0) {
|
||||||
abort = 1;
|
failed = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (redir == 0)
|
if (redir == 0)
|
||||||
pr("\nExecute : %s\n", buf);
|
pr("\nExecute : %s\n", buf);
|
||||||
if (dispatch(buf, redir) < 0)
|
if (dispatch(buf, redir) < 0)
|
||||||
abort = 1;
|
failed = 1;
|
||||||
}
|
}
|
||||||
if (abort) {
|
if (failed) {
|
||||||
while (recvclient(buf, sizeof(buf)) >= 0) ;
|
while (recvclient(buf, sizeof(buf)) >= 0) ;
|
||||||
}
|
}
|
||||||
if (redir == 0)
|
if (redir == 0)
|
||||||
pr("Execute : %s\n", abort ? "aborted" : "terminated");
|
pr("Execute : %s\n", failed ? "aborted" : "terminated");
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ show_motd(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
match_user(char *file, struct player *player)
|
match_user(char *file, struct player *p)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int match = 0;
|
int match = 0;
|
||||||
|
@ -395,9 +395,9 @@ match_user(char *file, struct player *player)
|
||||||
break;
|
break;
|
||||||
host[strlen(host) - 1] = '\0';
|
host[strlen(host) - 1] = '\0';
|
||||||
user[strlen(user) - 1] = '\0';
|
user[strlen(user) - 1] = '\0';
|
||||||
if (strstr(player->userid, user) &&
|
if (strstr(p->userid, user) &&
|
||||||
(strstr(player->hostaddr, host) ||
|
(strstr(p->hostaddr, host) ||
|
||||||
strstr(player->hostname, host)))
|
strstr(p->hostname, host)))
|
||||||
++match;
|
++match;
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
@ -412,8 +412,8 @@ quit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
s_char *
|
s_char *
|
||||||
praddr(struct player *player)
|
praddr(struct player *p)
|
||||||
{
|
{
|
||||||
return prbuf("%s@%s", player->userid,
|
return prbuf("%s@%s", p->userid,
|
||||||
*player->hostname ? player->hostname : player->hostaddr);
|
*p->hostname ? p->hostname : p->hostaddr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue