Hi,

here a patch so the remok-server listen only on localhost.

greets
Michael

diff -ruN --exclude=.git remoko-server/debian/changelog remoko-server.changed/debian/changelog
--- remoko-server/debian/changelog	2008-12-17 19:48:38.000000000 +0100
+++ remoko-server.changed/debian/changelog	2008-12-20 12:23:29.000000000 +0100
@@ -1,3 +1,12 @@
+remoko-server (0~svn20080822+nmu1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * hidclient listen on localhost.
+  * fix a typing error.
+  * removes compiler warnings.
+
+ -- Michael Kurz <bet...@evil.elkcloner.org>  Sat, 20 Dec 2008 12:19:07 +0100
+
 remoko-server (0~svn20080822) pkg-fso; urgency=low
 
   * Initial release.
diff -ruN --exclude=.git remoko-server/src/hidclient.c remoko-server.changed/src/hidclient.c
--- remoko-server/src/hidclient.c	2008-12-17 19:48:01.000000000 +0100
+++ remoko-server.changed/src/hidclient.c	2008-12-20 13:33:43.000000000 +0100
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <strings.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -32,6 +33,8 @@
 #include <signal.h>
 #include <getopt.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
+
 #include <sys/types.h> 
 #include <sys/poll.h>
 #include <sys/ioctl.h>
@@ -71,7 +74,7 @@
      bzero((char *) &serv_addr, sizeof(serv_addr));
      portno = 6543;
      serv_addr.sin_family = AF_INET;
-     serv_addr.sin_addr.s_addr = INADDR_ANY;
+     serv_addr.sin_addr.s_addr =  inet_addr("127.0.0.1");
      serv_addr.sin_port = htons(portno);
 
      if (bind(sockfd, (struct sockaddr *) &serv_addr,sizeof(serv_addr)) < 0){
@@ -225,7 +228,12 @@
 
 int main(int argc, char *argv[])
 {
-	int csk, isk,cs,is,n,sockfd, newsockfd, clilen,i,btn,mov_x, mov_y, whell;
+	int csk, isk,cs,is,n,sockfd, newsockfd, i;
+	int btn = 0;
+	int mov_x = 0;
+	int mov_y = 0;
+	int whell = 0;
+	socklen_t clilen;
 	int lm = 0;
 	int hdev = 0;
 	uint8_t* dev_class;
@@ -240,7 +248,7 @@
    	char *result = NULL;
 	char tmp[2];
 
-     	struct sockaddr_in serv_addr, cli_addr;
+     	struct sockaddr_in cli_addr;
      
 	//Communication socket initialization
 	sockfd = create_socket();
@@ -309,7 +317,7 @@
 			if (strcmp(event,"02") == 0){
 
 				strncpy(event_msg, &buffer[0],17);
-				event[18] = '\0';
+				event_msg[17] = '\0';
 
 				result = strtok(event_msg, delims );
 	   			for(i=0; i < 5; i++) {
_______________________________________________
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland

Reply via email to