From cbf9d922fdbe19e65e8710dd72d6832e35144fc5 Mon Sep 17 00:00:00 2001 From: sr Date: Sat, 25 Aug 2012 18:59:12 +0200 Subject: [KERNEL] Make it possible to receive push messages by the server --- src/client/client.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/client') diff --git a/src/client/client.c b/src/client/client.c index 86b7cb9..c3318f4 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -95,6 +95,7 @@ int main(int argc, char *argv[]) msg.read_ahead_kb = DEFAULT_READ_AHEAD_KB; msg.port = htons(PORT); msg.addrtype = 0; + msg.imgname = NULL; int opt = 0; int longIndex = 0; @@ -166,7 +167,7 @@ int main(int argc, char *argv[]) fd = open(dev, O_WRONLY); printf("INFO: Closing device %s\n", dev); - const int ret = ioctl(fd, IOCTL_OPEN, &msg); + const int ret = ioctl(fd, IOCTL_CLOSE, &msg); if (ret < 0) { printf("ERROR: ioctl not successful (close, errcode: %d)\n", ret); @@ -183,9 +184,10 @@ int main(int argc, char *argv[]) fd = open(dev, O_WRONLY); printf("INFO: Switching device %s to %s\n", dev, ""); - if (ioctl(fd, IOCTL_SWITCH, &msg) < 0) + const int ret = ioctl(fd, IOCTL_SWITCH, &msg); + if (ret < 0) { - printf("ERROR: ioctl not successful (switch)\n"); + printf("ERROR: ioctl not successful (switch, errcode: %d)\n", ret); exit(EXIT_FAILURE); } -- cgit v1.2.3-55-g7522