use uuids for qwk message ids
This commit is contained in:
parent
876037e0ac
commit
18443d247e
@ -592,8 +592,9 @@ int bwave_add_message(int confr, int area, unsigned int dwritten, char *to, char
|
||||
s_JamSubfield jsf;
|
||||
int z;
|
||||
char buffer[256];
|
||||
char qwkuuid[38];
|
||||
uuid_t magi_msgid;
|
||||
|
||||
uuid_t qwk_msgid;
|
||||
struct mail_area *ma = get_area(confr, area);
|
||||
jb = open_jam_base(ma->path);
|
||||
if (!jb) {
|
||||
@ -701,7 +702,10 @@ int bwave_add_message(int confr, int area, unsigned int dwritten, char *to, char
|
||||
JAM_PutSubfield(jsp, &jsf);
|
||||
|
||||
if (conf.external_address != NULL) {
|
||||
snprintf(buffer, sizeof buffer, "<%lx.%s@%s>", generate_msgid(), basename(ma->path), conf.external_address);
|
||||
|
||||
uuid_generate(qwk_msgid);
|
||||
uuid_unparse_lower(qwk_msgid, qwkuuid);
|
||||
snprintf(buffer, sizeof buffer, "<%s@%s>", qwkuuid, conf.external_address);
|
||||
|
||||
jsf.LoID = JAMSFLD_MSGID;
|
||||
jsf.HiID = 0;
|
||||
|
@ -1388,6 +1388,7 @@ int read_message(struct user_record *user, struct msg_headers *msghs, int mailno
|
||||
s_JamLastRead jlr;
|
||||
|
||||
char buffer[256];
|
||||
char qwkuuid[38];
|
||||
int z, z2;
|
||||
struct tm msg_date;
|
||||
|
||||
@ -1411,6 +1412,7 @@ int read_message(struct user_record *user, struct msg_headers *msghs, int mailno
|
||||
int position;
|
||||
int y;
|
||||
uuid_t magi_msgid;
|
||||
uuid_t qwk_msgid;
|
||||
struct ptr_vector msg_lines;
|
||||
|
||||
init_ptr_vector(&msg_lines);
|
||||
@ -1734,7 +1736,9 @@ int read_message(struct user_record *user, struct msg_headers *msghs, int mailno
|
||||
JAM_PutSubfield(jsp, &jsf);
|
||||
|
||||
if (conf.external_address != NULL) {
|
||||
snprintf(buffer, sizeof buffer, "<%lx.%s@%s>", generate_msgid(), basename(ma->path), conf.external_address);
|
||||
uuid_generate(qwk_msgid);
|
||||
uuid_unparse_lower(qwk_msgid, qwkuuid);
|
||||
snprintf(buffer, sizeof buffer, "<%s@%s>", qwkuuid, conf.external_address);
|
||||
|
||||
jsf.LoID = JAMSFLD_MSGID;
|
||||
jsf.HiID = 0;
|
||||
@ -2027,11 +2031,12 @@ void post_message(struct user_record *user) {
|
||||
struct fido_addr *from_addr = NULL;
|
||||
char buffer[256];
|
||||
char buffer2[256];
|
||||
char qwkuuid[38];
|
||||
int z;
|
||||
int sem_fd;
|
||||
char *bbsname;
|
||||
uuid_t magi_msgid;
|
||||
|
||||
uuid_t qwk_msgid;
|
||||
s_JamBase *jb;
|
||||
s_JamMsgHeader jmh;
|
||||
s_JamSubPacket *jsp;
|
||||
@ -2203,7 +2208,9 @@ void post_message(struct user_record *user) {
|
||||
JAM_PutSubfield(jsp, &jsf);
|
||||
|
||||
if (conf.external_address != NULL) {
|
||||
snprintf(buffer, sizeof buffer, "<%lx.%s@%s>", generate_msgid(), basename(ma->path), conf.external_address);
|
||||
uuid_generate(qwk_msgid);
|
||||
uuid_unparse_lower(qwk_msgid, qwkuuid);
|
||||
snprintf(buffer, sizeof buffer, "<%s@%s>", qwkuuid, conf.external_address);
|
||||
|
||||
jsf.LoID = JAMSFLD_MSGID;
|
||||
jsf.HiID = 0;
|
||||
|
@ -945,6 +945,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
|
||||
int max_len;
|
||||
int len;
|
||||
char buffer[256];
|
||||
char qwkuuid[38];
|
||||
char *body2;
|
||||
char *tagline;
|
||||
struct utsname name;
|
||||
@ -956,7 +957,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
|
||||
size_t sz;
|
||||
char *inbuf, *oubuf;
|
||||
|
||||
uuid_t magi_msgid;
|
||||
uuid_t magi_msgid, qwk_msgid;
|
||||
|
||||
if (subj == NULL || to == NULL || body == NULL) {
|
||||
return 0;
|
||||
@ -1086,7 +1087,9 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
|
||||
JAM_PutSubfield(jsp, &jsf);
|
||||
|
||||
if (conf.external_address != NULL) {
|
||||
snprintf(buffer, sizeof buffer, "<%lx.%s@%s>", generate_msgid(), basename(ma->path), conf.external_address);
|
||||
uuid_generate(qwk_msgid);
|
||||
uuid_unparse_lower(qwk_msgid, qwkuuid);
|
||||
snprintf(buffer, sizeof buffer, "<%s@%s>", qwkuuid, conf.external_address);
|
||||
|
||||
jsf.LoID = JAMSFLD_MSGID;
|
||||
jsf.HiID = 0;
|
||||
|
Reference in New Issue
Block a user