From 76b0c13adc0c25533dfc6f8a9e783fd81cfda358 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Fri, 15 May 2015 19:49:25 +0200
Subject: degesch: actually use buffer_add()
---
degesch.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/degesch.c b/degesch.c
index 951f296..b33a0a2 100644
--- a/degesch.c
+++ b/degesch.c
@@ -2643,8 +2643,8 @@ init_buffers (struct app_context *ctx)
server->name = xstrdup ("server");
server->server = &ctx->server;
- LIST_APPEND_WITH_TAIL (ctx->buffers, ctx->buffers_tail, global);
- LIST_APPEND_WITH_TAIL (ctx->buffers, ctx->buffers_tail, server);
+ buffer_add (ctx, global);
+ buffer_add (ctx, server);
}
// --- Users, channels ---------------------------------------------------------
@@ -2694,8 +2694,9 @@ irc_get_or_make_user_buffer (struct server *s, const char *nickname)
buffer->name = xstrdup (nickname);
buffer->server = s;
buffer->user = user;
- LIST_APPEND_WITH_TAIL (s->ctx->buffers, s->ctx->buffers_tail, buffer);
str_map_set (&s->irc_buffer_map, user->nickname, buffer);
+
+ buffer_add (s->ctx, buffer);
return buffer;
}
@@ -3674,9 +3675,9 @@ irc_handle_join (struct server *s, const struct irc_message *msg)
buffer->server = s;
buffer->channel = channel =
irc_make_channel (s, xstrdup (channel_name));
- LIST_APPEND_WITH_TAIL (s->ctx->buffers, s->ctx->buffers_tail, buffer);
str_map_set (&s->irc_buffer_map, channel->name, buffer);
+ buffer_add (s->ctx, buffer);
buffer_activate (s->ctx, buffer);
}
--
cgit v1.2.3-70-g09d2