Terminal program for MailStation devices
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

main: After reading an input byte, restart loop

Otherwise if there is a character in the output queue, we'll keep
trying unsuccessfully to send it which just slows down the input
queue processing. Quickly read more data until there's nothing to
read, and then do the output queue.

This should probably stop at some point so we don't get flooded with
data.

+11 -4
+11 -4
main.c
··· 64 64 obuf[obuf_pos++] = c[x]; 65 65 } 66 66 67 - int main(void) 67 + int 68 + main(void) 68 69 { 69 70 unsigned char old_obuf_pos; 70 71 unsigned char ms[10]; ··· 140 141 switch (source) { 141 142 case SOURCE_MODEM: 142 143 modem_msr(); 143 - if (modem_lsr() & (1 << 0)) 144 + if (modem_lsr() & (1 << 0)) { 144 145 process_input(modem_read()); 146 + continue; 147 + } 145 148 break; 146 149 case SOURCE_LPT: 147 150 b = lptrecv(); 148 - if (b <= 0xff) 151 + if (b <= 0xff) { 149 152 process_input(b & 0xff); 153 + continue; 154 + } 150 155 break; 151 156 case SOURCE_WIFI: 152 157 b = wifi_read(); 153 - if (b != -1) 158 + if (b != -1) { 154 159 process_input(b & 0xff); 160 + continue; 161 + } 155 162 break; 156 163 } 157 164