Clean up after removal of wait command:

(player_wakeup_all, player_wakeup): Remove.  Callers changed.
(player): Remove member waiting.
This commit is contained in:
Markus Armbruster 2007-01-31 06:08:39 +00:00
parent fcef921437
commit 3788676530
5 changed files with 2 additions and 29 deletions

View file

@ -65,7 +65,6 @@ struct player {
int god;
int owner;
int nstat;
int waiting;
int simulation; /* e.g. budget command */
double dolcost;
int broke;

View file

@ -400,8 +400,6 @@ extern struct player *player_delete(struct player *);
extern struct player *player_next(struct player *);
extern struct player *player_prev(struct player *);
extern struct player *getplayer(natid);
extern void player_wakeup_all(natid);
extern void player_wakeup(struct player *);
extern void player_accept(void *);
/* dispatch.c */
extern int dispatch(char *, char *);

View file

@ -159,7 +159,6 @@ sendmessage(struct natstr *us, struct natstr *to, char *message, int verbose)
else
pr_flash(other, "%s (#%d): %s\n",
us->nat_cnam, us->nat_cnum, message);
player_wakeup(other);
sent++;
}
if (player->god) {

View file

@ -163,22 +163,6 @@ getplayer(natid cnum)
return NULL;
}
void
player_wakeup_all(natid cnum)
{
struct player *lp;
if (NULL != (lp = getplayer(cnum)))
player_wakeup(lp);
}
void
player_wakeup(struct player *pl)
{
if (pl->waiting)
empth_wakeup(pl->proc);
}
/*ARGSUSED*/
void
player_accept(void *unused)

View file

@ -129,7 +129,6 @@ typed_wu(natid from, natid to, char *message, int type)
#endif
int fd;
char box[1024];
int notify = 0;
int write_ok = 0;
int new_tele = 0;
struct player *other;
@ -181,16 +180,12 @@ typed_wu(natid from, natid to, char *message, int type)
continue;
if (!player->god && (getrejects(from, np) & REJ_ANNO))
continue;
notify = (np->nat_ann == 0);
np->nat_ann++;
putnat(np);
if (notify)
player_wakeup_all(to);
}
} else if (write_ok) {
notify = (np->nat_tgms == 0);
new_tele = telegram_is_new(to, &tel);
np->nat_tgms += new_tele || notify;
np->nat_tgms += new_tele || np->nat_tgms == 0;
putnat(np);
if (new_tele && np->nat_flags & NF_INFORM) {
@ -199,10 +194,8 @@ typed_wu(natid from, natid to, char *message, int type)
pr_inform(other, "[new tele]\n");
else
pr_inform(other, "[%d new teles]\n", np->nat_tgms);
player_wakeup_all(to);
}
} else if (notify)
player_wakeup_all(to);
}
}
return 0;