Skip to content
Snippets Groups Projects
Commit edf54341 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

(try to) Fix some Windows specific bits from the ringbuf change

parent a2aa9631
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3524 failed
......@@ -31,6 +31,7 @@
#include "ini_file.h"
#include "git_branch.h"
#include "git_hash.h"
#include "eventwrap.h"
#define INI_FILENAME "sbbsexec.ini"
#define RINGBUF_SIZE_IN 10000
......@@ -287,7 +288,7 @@ unsigned vdd_read(BYTE* p, unsigned count)
count=RingBufRead(&rdbuf,p,count);
if(count==0) {
lputs(LOG_ERR,"!VDD_READ: RingBufRead read 0, waiting");
if(sem_trywait_block(&rdbuf.sem, READ_TIMEOUT) != 0)
if(WaitforEvent(rdbuf.data_event, READ_TIMEOUT) != WAIT_OBJECT_0)
lputs(LOG_ERR,"!VDD_READ: rdbuf sem timeout");
count = RingBufRead(&rdbuf,p,count);
lputs(LOG_ERR,"!VDD_READ: RingBufRead read 0 (after wait)");
......
......@@ -821,7 +821,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
if(!(startup->options&BBS_OPT_NO_TELNET_GA))
send_telnet_cmd(TELNET_GA,0);
}
sem_trywait_block(&inbuf.sem,100);
WaitForEvent(inbuf.data, 100);
} else
loop_since_io=0;
}
......
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