[Olsr-cvs] olsrd-current/lib/dot_draw/src olsrd_dot_draw.c, 1.25, 1.26 olsrd_dot_draw.h, 1.9, 1.10 olsrd_plugin.c, 1.16, 1.17
Bernd Petrovitsch
(spam-protected)
Mon Jul 23 14:58:41 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/lib/dot_draw/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26846/lib/dot_draw/src
Modified Files:
olsrd_dot_draw.c olsrd_dot_draw.h olsrd_plugin.c
Log Message:
* fix for the dot-draw plugin breakage
Index: olsrd_dot_draw.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/dot_draw/src/olsrd_dot_draw.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** olsrd_dot_draw.h 15 Jul 2007 19:29:37 -0000 1.9
--- olsrd_dot_draw.h 23 Jul 2007 12:58:38 -0000 1.10
***************
*** 51,55 ****
#include "plugin_util.h"
! extern struct in_addr ipc_accept_ip;
extern int ipc_port;
--- 51,55 ----
#include "plugin_util.h"
! extern union olsr_ip_addr ipc_accept_ip;
extern int ipc_port;
Index: olsrd_dot_draw.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/dot_draw/src/olsrd_dot_draw.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** olsrd_dot_draw.c 15 Jul 2007 19:29:37 -0000 1.25
--- olsrd_dot_draw.c 23 Jul 2007 12:58:38 -0000 1.26
***************
*** 271,278 ****
else
{
! char *addr = inet_ntoa(pin.sin_addr);
! if(ntohl(pin.sin_addr.s_addr) != ntohl(ipc_accept_ip.s_addr))
{
! olsr_printf(0, "Front end-connection from foregin host(%s) not allowed!\n", addr);
close(ipc_connection);
ipc_connection = -1;
--- 271,277 ----
else
{
! if(ntohl(pin.sin_addr.s_addr) != ntohl(ipc_accept_ip.v4))
{
! olsr_printf(0, "Front end-connection from foreign host (%s) not allowed!\n", inet_ntoa(pin.sin_addr));
close(ipc_connection);
ipc_connection = -1;
***************
*** 281,285 ****
{
ipc_open = 1;
! olsr_printf(1, "(DOT DRAW)IPC: Connection from %s\n",addr);
pcf_event(1, 1, 1);
}
--- 280,284 ----
{
ipc_open = 1;
! olsr_printf(1, "(DOT DRAW)IPC: Connection from %s\n",inet_ntoa(pin.sin_addr));
pcf_event(1, 1, 1);
}
Index: olsrd_plugin.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/dot_draw/src/olsrd_plugin.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** olsrd_plugin.c 15 Jul 2007 19:29:37 -0000 1.16
--- olsrd_plugin.c 23 Jul 2007 12:58:38 -0000 1.17
***************
*** 61,69 ****
#define PLUGIN_INTERFACE_VERSION 5
! struct in_addr ipc_accept_ip;
int ipc_port;
! static void my_init(void) __attribute__ ((constructor)) ;
! static void my_fini(void) __attribute__ ((destructor));
--- 61,69 ----
#define PLUGIN_INTERFACE_VERSION 5
! union olsr_ip_addr ipc_accept_ip;
int ipc_port;
! static void my_init(void) __attribute__((constructor));
! static void my_fini(void) __attribute__((destructor));
***************
*** 78,82 ****
/* defaults for parameters */
ipc_port = 2004;
! ipc_accept_ip.s_addr = htonl(INADDR_LOOPBACK);
}
--- 78,82 ----
/* defaults for parameters */
ipc_port = 2004;
! ipc_accept_ip.v4 = htonl(INADDR_LOOPBACK);
}
More information about the Olsr-cvs
mailing list