File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,13 @@ static void* comm_thread( void* arg)
62
62
int eof_on_input = 0 ;
63
63
char pending_input ;
64
64
char pending_output ;
65
+ int prescaler = 0 ;
65
66
/*
66
67
* The data from the stdout pipe does not become available until
67
68
* stdout is flushed. So the timer is set to a short cycle that
68
69
* flushes stdout with each timeout.
69
70
*/
70
71
while (1 ) {
71
- int prescaler = 0 ;
72
72
/* wait for event */
73
73
int rc = poll ( fds , (eof_on_input ) ? 2 : 4 , timeout );
74
74
#if LL_DEBUG
@@ -83,10 +83,8 @@ static void* comm_thread( void* arg)
83
83
} else if (rc == 0 || (rc < 0 && errno == EINTR )) {
84
84
// timeout, send dummy character to keep connection alive
85
85
if (++ prescaler > keep_alive_timeout / timeout ) {
86
- printf ( "%c" , 0 );
87
- if (DEBUG_COMM && (debug_flags & DEBUG_COMM )) {
88
- fprintf ( stderr , "<KEEP ALIVE SENT>" );
89
- }
86
+ printf ( "%c" , 10 ); // only safe code for pronterface !
87
+ fprintf ( stderr , "<KEEP ALIVE SENT>" );
90
88
prescaler = 0 ;
91
89
}
92
90
#if LL_DEBUG
You can’t perform that action at this time.
0 commit comments