From b9ea295a9f214f3a73edc70dbb41a7c2439de225 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 2 Mar 2014 15:57:57 -0500 Subject: [PATCH] Writing some cool code instead of thinking about BJG and LJG. --- citadel/modules/nntp/serv_nntp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/citadel/modules/nntp/serv_nntp.c b/citadel/modules/nntp/serv_nntp.c index 0210f789d..2d1a2c52e 100644 --- a/citadel/modules/nntp/serv_nntp.c +++ b/citadel/modules/nntp/serv_nntp.c @@ -820,6 +820,23 @@ void nntp_last_next(const char *cmd) { return; } + // ok, here we go ... fetch the msglist so we can figure out our place in the universe + struct nntp_msglist nm; + long low_water_mark = 0; + long high_water_mark = 0; + + nm = nntp_fetch_msglist(&CC->room); + if ((nm.num_msgs > 0) && (nm.msgnums != NULL)) { + low_water_mark = nm.msgnums[0]; + high_water_mark = nm.msgnums[nm.num_msgs - 1]; + } + else { + cprintf("500 something bad happened\r\n"); + return; + } + + // ok now let's get all up in this msglist FIXME + cprintf("500 FIXME cmd=%d current_article_number=%ld\r\n", acmd, nntpstate->current_article_number); } -- 2.30.2