From b8436ddfde4f26ece7cc3a442f05d44cb999118d Mon Sep 17 00:00:00 2001 From: default Date: Thu, 22 Sep 2022 17:12:46 +0200 Subject: [PATCH] Renamed enqueue() to enqueue_output(). --- data.c | 6 +++--- snac.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/data.c b/data.c index 66dcda3..c5f68de 100644 --- a/data.c +++ b/data.c @@ -600,8 +600,8 @@ int is_muted(snac *snac, char *actor) } -void enqueue(snac *snac, char *actor, char *msg, int retries) -/* enqueues a message for an actor */ +void enqueue_output(snac *snac, char *actor, char *msg, int retries) +/* enqueues an output message for an actor */ { if (strcmp(actor, snac->actor) == 0) { snac_debug(snac, 1, xs_str_new("enqueue refused to myself")); @@ -619,6 +619,7 @@ void enqueue(snac *snac, char *actor, char *msg, int retries) xs *rn = xs_number_new(retries); xs *j; + qmsg = xs_dict_append(qmsg, "type", "output"); qmsg = xs_dict_append(qmsg, "actor", actor); qmsg = xs_dict_append(qmsg, "object", msg); qmsg = xs_dict_append(qmsg, "retries", rn); @@ -643,7 +644,6 @@ d_char *queue(snac *snac) glob_t globbuf; time_t t = time(NULL); - /* get the list in reverse order */ if (glob(spec, 0, NULL, &globbuf) == 0) { int n; char *p; diff --git a/snac.h b/snac.h index d2cb9c3..ac22842 100644 --- a/snac.h +++ b/snac.h @@ -61,7 +61,8 @@ void mute(snac *snac, char *actor); void unmute(snac *snac, char *actor); int is_muted(snac *snac, char *actor); -void enqueue(snac *snac, char *actor, char *msg, int retries); +void enqueue_output(snac *snac, char *actor, char *msg, int retries); + d_char *queue(snac *snac); d_char *dequeue(snac *snac, char *fn);