summaryrefslogtreecommitdiff
path: root/serialclient.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-13 12:49:19 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-13 12:49:19 (GMT)
commit8fce4645f96514daeea47e361c881b8ba8c11439 (patch)
tree634e3ab5965792b881aa402421dbfe406e9e2eb7 /serialclient.c
parent8b065cd5f0045b12a6ddb8c83d70c08258205ecc (diff)
options parser for new serialclient
added serialclient to Makefile
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);