projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a0c07d9
)
NNTP ARTICLE/HEAD/BODY/STAT now return the message-id associated with the message...
author
Art Cancro
<ajc@uncensored.citadel.org>
Wed, 12 Feb 2014 20:24:54 +0000
(15:24 -0500)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Wed, 12 Feb 2014 20:24:54 +0000
(15:24 -0500)
citadel/modules/nntp/serv_nntp.c
patch
|
blob
|
history
diff --git
a/citadel/modules/nntp/serv_nntp.c
b/citadel/modules/nntp/serv_nntp.c
index fb81dd9b14211bc4fdf837153f6811215dfabbcd..6a75c622a5cd0e9c5b7845e7327b7f940171a9da 100644
(file)
--- a/
citadel/modules/nntp/serv_nntp.c
+++ b/
citadel/modules/nntp/serv_nntp.c
@@
-761,6
+761,7
@@
void nntp_article(const char *cmd) {
// At this point we know the message number of the "article" being requested.
// We have an awesome API call that does all the heavy lifting for us.
// At this point we know the message number of the "article" being requested.
// We have an awesome API call that does all the heavy lifting for us.
+ char *fetched_message_id = NULL;
CC->redirect_buffer = NewStrBufPlain(NULL, SIZ);
int fetch = CtdlOutputMsg(requested_msgnum,
MT_RFC822, // output in RFC822 format ... sort of
CC->redirect_buffer = NewStrBufPlain(NULL, SIZ);
int fetch = CtdlOutputMsg(requested_msgnum,
MT_RFC822, // output in RFC822 format ... sort of
@@
-771,7
+772,7
@@
void nntp_article(const char *cmd) {
0, // no flags yet ... maybe new ones for Path: etc ?
NULL,
NULL,
0, // no flags yet ... maybe new ones for Path: etc ?
NULL,
NULL,
- NULL // FIXME this is where we grab teh message ID !!
+ &fetched_message_id // extract the message ID from the message as we go...
);
StrBuf *msgtext = CC->redirect_buffer;
CC->redirect_buffer = NULL;
);
StrBuf *msgtext = CC->redirect_buffer;
CC->redirect_buffer = NULL;
@@
-783,16
+784,16
@@
void nntp_article(const char *cmd) {
}
if (acmd == ARTICLE) {
}
if (acmd == ARTICLE) {
- cprintf("220 %ld <
FIXME@FIXME>\r\n", requested_msgnum
);
+ cprintf("220 %ld <
%s>\r\n", requested_msgnum, fetched_message_id
);
}
if (acmd == HEAD) {
}
if (acmd == HEAD) {
- cprintf("221 %ld <
FIXME@FIXME>\r\n", requested_msgnum
);
+ cprintf("221 %ld <
%s>\r\n", requested_msgnum, fetched_message_id
);
}
if (acmd == BODY) {
}
if (acmd == BODY) {
- cprintf("222 %ld <
FIXME@FIXME>\r\n", requested_msgnum
);
+ cprintf("222 %ld <
%s>\r\n", requested_msgnum, fetched_message_id
);
}
if (acmd == STAT) {
}
if (acmd == STAT) {
- cprintf("223 %ld <
FIXME@FIXME>\r\n", requested_msgnum
);
+ cprintf("223 %ld <
%s>\r\n", requested_msgnum, fetched_message_id
);
FreeStrBuf(&msgtext);
return;
}
FreeStrBuf(&msgtext);
return;
}
@@
-800,6
+801,7
@@
void nntp_article(const char *cmd) {
client_write(SKEY(msgtext));
cprintf(".\r\n"); // this protocol uses a dot terminator
FreeStrBuf(&msgtext);
client_write(SKEY(msgtext));
cprintf(".\r\n"); // this protocol uses a dot terminator
FreeStrBuf(&msgtext);
+ if (fetched_message_id) free(fetched_message_id);
}
}