*
*/
-#ifdef DLL_EXPORT
-#define IN_LIBCIT
-#endif
-
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
struct CtdlMessage *msg;
msg = CtdlFetchMessage(msgnum, 0);
- if (msg < 0L) {
+ if (msg == NULL) {
cprintf("%ld|0|||||\n", msgnum);
return;
}
for (i=0; i<num_tokens(CC->preferred_formats, '|'); ++i) {
extract_token(buf, CC->preferred_formats, i, '|', sizeof buf);
if (!strcasecmp(buf, cbtype)) {
- strcpy(ma->chosen_part, partnum);
+ if (num_tokens(partnum, '.') < 3) {
+ safestrncpy(ma->chosen_part, partnum, sizeof ma->chosen_part);
+ }
}
}
}
/* Here is the weird form of this command, to process only an
* encapsulated message/rfc822 section.
*/
- if (section) {
+ if (section) if (strlen(section)>0) if (strcmp(section, "0")) {
memset(&encap, 0, sizeof encap);
safestrncpy(encap.desired_section, section, sizeof encap.desired_section);
mime_parser(TheMessage->cm_fields['M'],
char this_recp[256];
char this_recp_cooked[256];
char append[SIZ];
- int num_recps;
+ int num_recps = 0;
int i, j;
int mailtype;
int invalid;
num = extract_long(args, 0);
extract_token(targ, args, 1, '|', sizeof targ);
+ convert_room_name_macros(targ, sizeof targ);
targ[ROOMNAMELEN - 1] = 0;
is_copy = extract_int(args, 2);