Skip to content
Snippets Groups Projects
Commit ae325308 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't use user's default download protocol for msg attachments

Fix issue #801
parent f25fafae
No related branches found
No related tags found
No related merge requests found
Pipeline #6892 passed
......@@ -357,7 +357,7 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, int p_mode, post_t* post)
return true;
}
void sbbs_t::download_msg_attachments(smb_t* smb, smbmsg_t* msg, bool del)
void sbbs_t::download_msg_attachments(smb_t* smb, smbmsg_t* msg, bool del, bool use_default_prot)
{
char str[256];
char fpath[MAX_PATH+1];
......@@ -383,7 +383,7 @@ void sbbs_t::download_msg_attachments(smb_t* smb, smbmsg_t* msg, bool del)
if(!result)
errormsg(WHERE, ERR_WRITE, fpath, filelen);
else
sendfile(fpath, useron.prot, "attachment");
sendfile(fpath, use_default_prot ? useron.prot : 0, "attachment");
}
}
} else
......
......@@ -900,7 +900,7 @@ public:
uint getlastmsg(int subnum, uint32_t *ptr, time_t *t);
time_t getmsgtime(int subnum, uint ptr);
int getmsgnum(int subnum, time_t t);
void download_msg_attachments(smb_t*, smbmsg_t*, bool del);
void download_msg_attachments(smb_t*, smbmsg_t*, bool del, bool use_default_prot = false);
/* readmail.cpp */
int readmail(uint usernumber, int which, int lm_mode = 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment