Skip to content
Snippets Groups Projects
Commit 86652976 authored by rswindell's avatar rswindell
Browse files

Use smb_init_idx() to re-calculate CRC fields in msg.idx.

parent cfe8e5f5
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,7 @@ int fixsmb(char* sub)
{
char* p;
char* text;
char str[MAX_PATH+1],c;
char c;
int i,w;
ulong l,length,size,n;
smbmsg_t msg;
......@@ -220,24 +220,7 @@ int fixsmb(char* sub)
msg.idx.number=msg.hdr.number;
msg.idx.attr=msg.hdr.attr;
msg.idx.time=msg.hdr.when_imported.time;
msg.idx.subj=smb_subject_crc(msg.subj);
if(smb.status.attr&SMB_EMAIL) {
if(msg.to_ext)
msg.idx.to=atoi(msg.to_ext);
else
msg.idx.to=0;
if(msg.from_ext)
msg.idx.from=atoi(msg.from_ext);
else
msg.idx.from=0;
} else {
SAFECOPY(str,msg.to);
strlwr(str);
msg.idx.to=crc16(str,0);
SAFECOPY(str,msg.from);
strlwr(str);
msg.idx.from=crc16(str,0);
}
smb_init_idx(&smb,&msg);
if((i=smb_putmsg(&smb,&msg))!=0) {
printf("\nsmb_putmsg returned %d: %s\n",i,smb.last_error);
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment