0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-27 04:43:52 +01:00
This commit is contained in:
2025-12-22 14:35:04 +01:00
parent 47393a9016
commit ca3cf036ac
4 changed files with 65 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ int open_udp_server(int port, RDSModulator* rds_mod) {
poller.events = POLLIN;
mod = rds_mod;
init_lua(rds_mod);
return 0;
}
@@ -60,6 +61,7 @@ void poll_udp_server() {
memset(cmd_output, 0, BUF_SIZE);
process_ascii_cmd(mod, cmd_buf, cmd_output);
run_lua(cmd_buf, NULL);
size_t out_len = strlen(cmd_output);
if (out_len > 0) {
@@ -74,4 +76,5 @@ void poll_udp_server() {
void close_udp_server() {
if (sockfd >= 0) close(sockfd);
sockfd = -1;
destroy_lua();
}