mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
some refactoring
This commit is contained in:
@@ -24,7 +24,7 @@ int open_control_pipe(char *filename) {
|
||||
* Polls the control file (pipe), and if a command is received,
|
||||
* calls process_ascii_cmd.
|
||||
*/
|
||||
void poll_control_pipe(RDSModulator* enc) {
|
||||
void poll_control_pipe(RDSModulator* mod) {
|
||||
static unsigned char pipe_buf[CTL_BUFFER_SIZE];
|
||||
static unsigned char cmd_buf[CMD_BUFFER_SIZE];
|
||||
int bytes_read;
|
||||
@@ -47,7 +47,7 @@ void poll_control_pipe(RDSModulator* enc) {
|
||||
if (cmd_len > 0 && cmd_len < CMD_BUFFER_SIZE) {
|
||||
memset(cmd_buf, 0, CMD_BUFFER_SIZE);
|
||||
strncpy((char *)cmd_buf, token, CMD_BUFFER_SIZE - 1);
|
||||
process_ascii_cmd(enc, cmd_buf);
|
||||
process_ascii_cmd(mod, cmd_buf);
|
||||
}
|
||||
token = strtok(NULL, "\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user