minimodem: do not call setitimer(new_value=NULL)
Linux kernel warns: minimodem calls setitimer() with new_value NULL pointer. Misfeature support will be removed Thanks Robert Hooker, for reporting.
This commit is contained in:
parent
1f74732147
commit
7ab18a268f
|
@ -98,6 +98,11 @@ static void fsk_transmit_stdin(
|
||||||
{0, 1000000/(float)(data_rate+data_rate*0.03) } // it_value
|
{0, 1000000/(float)(data_rate+data_rate*0.03) } // it_value
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct itimerval itv_zero = {
|
||||||
|
{0, 0}, // it_interval
|
||||||
|
{0, 0} // it_value
|
||||||
|
};
|
||||||
|
|
||||||
if ( tx_interactive )
|
if ( tx_interactive )
|
||||||
signal(SIGALRM, tx_stop_transmit_sighandler);
|
signal(SIGALRM, tx_stop_transmit_sighandler);
|
||||||
|
|
||||||
|
@ -105,7 +110,7 @@ static void fsk_transmit_stdin(
|
||||||
while ( (c = getchar()) != EOF )
|
while ( (c = getchar()) != EOF )
|
||||||
{
|
{
|
||||||
if ( tx_interactive )
|
if ( tx_interactive )
|
||||||
setitimer(ITIMER_REAL, NULL, NULL);
|
setitimer(ITIMER_REAL, &itv_zero, NULL);
|
||||||
|
|
||||||
// fprintf(stderr, "<c=%d>", c);
|
// fprintf(stderr, "<c=%d>", c);
|
||||||
unsigned int nwords;
|
unsigned int nwords;
|
||||||
|
@ -139,7 +144,7 @@ static void fsk_transmit_stdin(
|
||||||
setitimer(ITIMER_REAL, &itv, NULL);
|
setitimer(ITIMER_REAL, &itv, NULL);
|
||||||
}
|
}
|
||||||
if ( tx_interactive ) {
|
if ( tx_interactive ) {
|
||||||
setitimer(ITIMER_REAL, NULL, NULL);
|
setitimer(ITIMER_REAL, &itv_zero, NULL);
|
||||||
signal(SIGALRM, SIG_DFL);
|
signal(SIGALRM, SIG_DFL);
|
||||||
}
|
}
|
||||||
if ( !tx_transmitting )
|
if ( !tx_transmitting )
|
||||||
|
|
Loading…
Reference in New Issue