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
Branches
Tags
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) ...@@ -357,7 +357,7 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, int p_mode, post_t* post)
return true; 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 str[256];
char fpath[MAX_PATH+1]; char fpath[MAX_PATH+1];
...@@ -383,7 +383,7 @@ void sbbs_t::download_msg_attachments(smb_t* smb, smbmsg_t* msg, bool del) ...@@ -383,7 +383,7 @@ void sbbs_t::download_msg_attachments(smb_t* smb, smbmsg_t* msg, bool del)
if(!result) if(!result)
errormsg(WHERE, ERR_WRITE, fpath, filelen); errormsg(WHERE, ERR_WRITE, fpath, filelen);
else else
sendfile(fpath, useron.prot, "attachment"); sendfile(fpath, use_default_prot ? useron.prot : 0, "attachment");
} }
} }
} else } else
......
...@@ -900,7 +900,7 @@ public: ...@@ -900,7 +900,7 @@ public:
uint getlastmsg(int subnum, uint32_t *ptr, time_t *t); uint getlastmsg(int subnum, uint32_t *ptr, time_t *t);
time_t getmsgtime(int subnum, uint ptr); time_t getmsgtime(int subnum, uint ptr);
int getmsgnum(int subnum, time_t t); 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 */ /* readmail.cpp */
int readmail(uint usernumber, int which, int lm_mode = 0); 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