Removed adding OADDRESS...
This commit is contained in:
parent
de14c1ba69
commit
8a3413203f
28
mail_menu.c
28
mail_menu.c
@ -279,7 +279,7 @@ void read_message(int socket, struct user_record *user, int mailno) {
|
|||||||
printf("Error opening JAM base.. %s\n", conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->path);
|
printf("Error opening JAM base.. %s\n", conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
memset(&jmh, 0, sizeof(s_JamMsgHeader));
|
||||||
z = JAM_ReadMsgHeader(jb, mailno, &jmh, &jsp);
|
z = JAM_ReadMsgHeader(jb, mailno, &jmh, &jsp);
|
||||||
if (z != 0) {
|
if (z != 0) {
|
||||||
return;
|
return;
|
||||||
@ -388,6 +388,7 @@ void read_message(int socket, struct user_record *user, int mailno) {
|
|||||||
free(from);
|
free(from);
|
||||||
if (from_addr != NULL) {
|
if (from_addr != NULL) {
|
||||||
free(from_addr);
|
free(from_addr);
|
||||||
|
from_addr = NULL;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -473,6 +474,7 @@ void read_message(int socket, struct user_record *user, int mailno) {
|
|||||||
printf("Failed to lock msg base!\n");
|
printf("Failed to lock msg base!\n");
|
||||||
if (from_addr != NULL) {
|
if (from_addr != NULL) {
|
||||||
free(from_addr);
|
free(from_addr);
|
||||||
|
from_addr = NULL;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -505,6 +507,7 @@ void read_message(int socket, struct user_record *user, int mailno) {
|
|||||||
}
|
}
|
||||||
if (from_addr != NULL) {
|
if (from_addr != NULL) {
|
||||||
free(from_addr);
|
free(from_addr);
|
||||||
|
from_addr = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,6 +521,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
int j;
|
int j;
|
||||||
int z;
|
int z;
|
||||||
|
|
||||||
|
|
||||||
s_JamBase *jb;
|
s_JamBase *jb;
|
||||||
s_JamBaseHeader jbh;
|
s_JamBaseHeader jbh;
|
||||||
s_JamMsgHeader jmh;
|
s_JamMsgHeader jmh;
|
||||||
@ -538,7 +542,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
ulong jam_crc;
|
ulong jam_crc;
|
||||||
unsigned int lastmsg,currmsg;
|
unsigned int lastmsg,currmsg;
|
||||||
int lines;
|
int lines;
|
||||||
struct fido_addr *from_addr;
|
struct fido_addr *from_addr = NULL;
|
||||||
|
|
||||||
while (!domail) {
|
while (!domail) {
|
||||||
s_displayansi(socket, "mailmenu");
|
s_displayansi(socket, "mailmenu");
|
||||||
@ -599,7 +603,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JAM_ClearMsgHeader( &jmh );
|
JAM_ClearMsgHeader( &jmh );
|
||||||
jmh.DateWritten = time(NULL);
|
jmh.DateWritten = (uint32_t)time(NULL);
|
||||||
jmh.Attribute |= MSG_LOCAL;
|
jmh.Attribute |= MSG_LOCAL;
|
||||||
if (conf.mail_conferences[user->cur_mail_conf]->realnames == 0) {
|
if (conf.mail_conferences[user->cur_mail_conf]->realnames == 0) {
|
||||||
strcpy(buffer, user->loginname);
|
strcpy(buffer, user->loginname);
|
||||||
@ -608,6 +612,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jsp = JAM_NewSubPacket();
|
jsp = JAM_NewSubPacket();
|
||||||
|
|
||||||
jsf.LoID = JAMSFLD_SENDERNAME;
|
jsf.LoID = JAMSFLD_SENDERNAME;
|
||||||
jsf.HiID = 0;
|
jsf.HiID = 0;
|
||||||
jsf.DatLen = strlen(buffer);
|
jsf.DatLen = strlen(buffer);
|
||||||
@ -625,7 +630,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
jsf.DatLen = strlen(subject);
|
jsf.DatLen = strlen(subject);
|
||||||
jsf.Buffer = (uchar *)subject;
|
jsf.Buffer = (uchar *)subject;
|
||||||
JAM_PutSubfield(jsp, &jsf);
|
JAM_PutSubfield(jsp, &jsf);
|
||||||
|
/*
|
||||||
if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_ECHOMAIL_AREA) {
|
if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_ECHOMAIL_AREA) {
|
||||||
jmh.Attribute |= MSG_TYPEECHO;
|
jmh.Attribute |= MSG_TYPEECHO;
|
||||||
|
|
||||||
@ -640,10 +645,12 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
jsf.Buffer = (uchar *)buffer;
|
jsf.Buffer = (uchar *)buffer;
|
||||||
JAM_PutSubfield(jsp, &jsf);
|
JAM_PutSubfield(jsp, &jsf);
|
||||||
}
|
}
|
||||||
} else if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_NETMAIL_AREA) {
|
} else*/
|
||||||
|
if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_NETMAIL_AREA) {
|
||||||
jmh.Attribute |= MSG_TYPENET;
|
jmh.Attribute |= MSG_TYPENET;
|
||||||
jmh.Attribute |= MSG_KILLSENT;
|
jmh.Attribute |= MSG_KILLSENT;
|
||||||
if (conf.mail_conferences[user->cur_mail_conf]->nettype == NETWORK_FIDO) {
|
if (conf.mail_conferences[user->cur_mail_conf]->nettype == NETWORK_FIDO) {
|
||||||
|
/*
|
||||||
sprintf(buffer, "%d:%d/%d.%d", conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
sprintf(buffer, "%d:%d/%d.%d", conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net,
|
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net,
|
||||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node,
|
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node,
|
||||||
@ -653,7 +660,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
jsf.DatLen = strlen(buffer);
|
jsf.DatLen = strlen(buffer);
|
||||||
jsf.Buffer = (uchar *)buffer;
|
jsf.Buffer = (uchar *)buffer;
|
||||||
JAM_PutSubfield(jsp, &jsf);
|
JAM_PutSubfield(jsp, &jsf);
|
||||||
|
*/
|
||||||
if (from_addr != NULL) {
|
if (from_addr != NULL) {
|
||||||
|
|
||||||
sprintf(buffer, "%d:%d/%d.%d", from_addr->zone,
|
sprintf(buffer, "%d:%d/%d.%d", from_addr->zone,
|
||||||
@ -665,6 +672,8 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
jsf.DatLen = strlen(buffer);
|
jsf.DatLen = strlen(buffer);
|
||||||
jsf.Buffer = (uchar *)buffer;
|
jsf.Buffer = (uchar *)buffer;
|
||||||
JAM_PutSubfield(jsp, &jsf);
|
JAM_PutSubfield(jsp, &jsf);
|
||||||
|
free(from_addr);
|
||||||
|
from_addr = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -720,7 +729,10 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
i = atoi(buffer);
|
i = atoi(buffer);
|
||||||
closed = 0;
|
closed = 0;
|
||||||
s_putstring(socket, "\e[2J\e[1;37;44m[MSG#] Subject From To Date \r\n\e[0m");
|
s_putstring(socket, "\e[2J\e[1;37;44m[MSG#] Subject From To Date \r\n\e[0m");
|
||||||
|
|
||||||
for (j=i;j<jbh.ActiveMsgs;j++) {
|
for (j=i;j<jbh.ActiveMsgs;j++) {
|
||||||
|
memset(&jmh, 0, sizeof(s_JamMsgHeader));
|
||||||
|
printf("MSG %d\n", j);
|
||||||
z = JAM_ReadMsgHeader(jb, j, &jmh, &jsp);
|
z = JAM_ReadMsgHeader(jb, j, &jmh, &jsp);
|
||||||
if (z != 0) {
|
if (z != 0) {
|
||||||
printf("Failed to read msg header: %d Erro %d\n", z, JAM_Errno(jb));
|
printf("Failed to read msg header: %d Erro %d\n", z, JAM_Errno(jb));
|
||||||
@ -920,7 +932,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JAM_ClearMsgHeader( &jmh );
|
JAM_ClearMsgHeader( &jmh );
|
||||||
jmh.DateWritten = time(NULL);
|
jmh.DateWritten = (uint32_t)time(NULL);
|
||||||
jmh.Attribute |= MSG_PRIVATE;
|
jmh.Attribute |= MSG_PRIVATE;
|
||||||
|
|
||||||
strcpy(buffer, user->loginname);
|
strcpy(buffer, user->loginname);
|
||||||
@ -1159,7 +1171,7 @@ int mail_menu(int socket, struct user_record *user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JAM_ClearMsgHeader( &jmh );
|
JAM_ClearMsgHeader( &jmh );
|
||||||
jmh.DateWritten = time(NULL);
|
jmh.DateWritten = (uint32_t)time(NULL);
|
||||||
jmh.Attribute |= MSG_PRIVATE;
|
jmh.Attribute |= MSG_PRIVATE;
|
||||||
|
|
||||||
jsp = JAM_NewSubPacket();
|
jsp = JAM_NewSubPacket();
|
||||||
|
Reference in New Issue
Block a user