summaryrefslogtreecommitdiff
path: root/serialclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'serialclient.c')
-rw-r--r--serialclient.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/serialclient.c b/serialclient.c
index 1e5adb8..f374774 100644
--- a/serialclient.c
+++ b/serialclient.c
@@ -33,6 +33,10 @@
#include "daemon.h"
#include "utils.h"
+int process_cmd(const char* cmd, int fd, cmd_t **cmd_q, client_t* client_lst, options_t* opt)
+{
+}
+
int process_data(int src_fd, int dest_fd)
{
char* buffer[100];
@@ -80,7 +84,7 @@ int main_loop(int serial_fd, int cmd_fd, options_t* opt)
int return_value = 0;
- return_value = send_string(cmd_fd, opt->type);
+ return_value = send_string(cmd_fd, opt->type_);
while(!return_value) {
memcpy(&tmpfds, &readfds, sizeof(tmpfds));
@@ -207,7 +211,7 @@ int main(int argc, char* argv[])
fclose(pid_file);
}
- int cmd_fd = init_command_socket(opt.command_sock_);
+ int cmd_fd = connect_command_socket(opt.command_sock_);
if(cmd_fd < 0) {
options_clear(&opt);
log_close();
@@ -224,7 +228,7 @@ int main(int argc, char* argv[])
if(ret)
ret = 2;
else
- ret = main_loop(serial_fd, cmd_listen_fd, &opt);
+ ret = main_loop(serial_fd, cmd_fd, &opt);
}
if(ret == 2) {
@@ -237,7 +241,7 @@ int main(int argc, char* argv[])
break;
}
- close(cmd_listen_fd);
+ close(cmd_fd);
if(serial_fd > 0)
close(serial_fd);