Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 2d659107 authored by rswindell's avatar rswindell

Store the current external() mode flags where passthru_input_thread() can see

it and decide whether to write directly to the output ring buffer (EX_BIN) or
use rputs() for charset translations.
parent ded7193a
......@@ -2285,9 +2285,13 @@ void passthru_input_thread(void* arg)
break;
}
if(!RingBufWrite(&sbbs->outbuf, &ch, 1)) {
lprintf(LOG_ERR,"Cannot pass from passthru socket to outbuf");
break;
if(sbbs->xtrn_mode & EX_BIN) {
if(!RingBufWrite(&sbbs->outbuf, &ch, 1)) {
lprintf(LOG_ERR,"Cannot pass from passthru socket to outbuf");
break;
}
} else {
sbbs->rputs((char*)&ch, sizeof(ch));
}
}
if(sbbs->passthru_socket!=INVALID_SOCKET) {
......
......@@ -925,6 +925,7 @@ public:
/* xtrn.cpp */
int external(const char* cmdline, long mode, const char* startup_dir=NULL);
long xtrn_mode;
/* xtrn_sec.cpp */
int xtrn_sec(void); /* The external program section */
......
......@@ -406,6 +406,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
sbbsexec_start_t start;
OPENVXDHANDLE OpenVxDHandle;
xtrn_mode = mode;
lprintf(LOG_DEBUG,"Executing external: %s",cmdline);
if(startup_dir!=NULL && startup_dir[0] && !isdir(startup_dir)) {
......@@ -1340,6 +1341,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
char* p;
#endif
xtrn_mode = mode;
lprintf(LOG_DEBUG, "Executing external: %s", cmdline);
if(startup_dir!=NULL && startup_dir[0] && !isdir(startup_dir)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment