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

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

parent d0760706
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "ini_file.h" #include "ini_file.h"
#include "git_branch.h" #include "git_branch.h"
#include "git_hash.h" #include "git_hash.h"
#include "eventwrap.h"
#define INI_FILENAME "sbbsexec.ini" #define INI_FILENAME "sbbsexec.ini"
#define RINGBUF_SIZE_IN 10000 #define RINGBUF_SIZE_IN 10000
...@@ -287,7 +288,7 @@ unsigned vdd_read(BYTE* p, unsigned count) ...@@ -287,7 +288,7 @@ unsigned vdd_read(BYTE* p, unsigned count)
count=RingBufRead(&rdbuf,p,count); count=RingBufRead(&rdbuf,p,count);
if(count==0) { if(count==0) {
lputs(LOG_ERR,"!VDD_READ: RingBufRead read 0, waiting"); 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"); lputs(LOG_ERR,"!VDD_READ: rdbuf sem timeout");
count = RingBufRead(&rdbuf,p,count); count = RingBufRead(&rdbuf,p,count);
lputs(LOG_ERR,"!VDD_READ: RingBufRead read 0 (after wait)"); 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) ...@@ -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)) if(!(startup->options&BBS_OPT_NO_TELNET_GA))
send_telnet_cmd(TELNET_GA,0); send_telnet_cmd(TELNET_GA,0);
} }
sem_trywait_block(&inbuf.sem,100); WaitForEvent(inbuf.data, 100);
} else } else
loop_since_io=0; 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