[Olsr-cvs] olsrd-current/src olsrd_plugin.h, 1.5, 1.6 plugin_loader.c, 1.31, 1.32 plugin_util.c, 1.5, 1.6
Bernd Petrovitsch
(spam-protected)
Mon Sep 17 23:57:08 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10901/src
Modified Files:
olsrd_plugin.h plugin_loader.c plugin_util.c
Log Message:
- applied 115-olsrd-nameserviceparamfix.patch and
116-olsrd-fix-pluginparam-addons.patch by Sven-Ola Tücke
<(spam-protected)> fixing the compilation warning on 64bit.
Index: olsrd_plugin.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsrd_plugin.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** olsrd_plugin.h 16 Sep 2007 22:11:30 -0000 1.5
--- olsrd_plugin.h 17 Sep 2007 21:57:06 -0000 1.6
***************
*** 79,83 ****
/* Interface version 5 */
! typedef int set_plugin_parameter(const char *value, void *data, unsigned int addon);
struct olsrd_plugin_parameters {
--- 79,88 ----
/* Interface version 5 */
! typedef union {
! unsigned int ui;
! char *pc;
! } set_plugin_parameter_addon;
!
! typedef int set_plugin_parameter(const char *value, void *data, set_plugin_parameter_addon addon);
struct olsrd_plugin_parameters {
***************
*** 85,89 ****
set_plugin_parameter *set_plugin_parameter;
void *data;
! unsigned int addon;
};
--- 90,94 ----
set_plugin_parameter *set_plugin_parameter;
void *data;
! set_plugin_parameter_addon addon;
};
Index: plugin_util.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_util.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** plugin_util.c 16 Sep 2007 22:14:08 -0000 1.5
--- plugin_util.c 17 Sep 2007 21:57:06 -0000 1.6
***************
*** 45,49 ****
#include "defs.h"
! int set_plugin_port(const char *value, void *data, unsigned int addon __attribute__((unused)))
{
char *endptr;
--- 45,49 ----
#include "defs.h"
! int set_plugin_port(const char *value, void *data, set_plugin_parameter_addon addon __attribute__((unused)))
{
char *endptr;
***************
*** 67,71 ****
}
! int set_plugin_ipaddress(const char *value, void *data, unsigned int addon __attribute__((unused)))
{
char buf[INET6_ADDRSTRLEN];
--- 67,71 ----
}
! int set_plugin_ipaddress(const char *value, void *data, set_plugin_parameter_addon addon __attribute__((unused)))
{
char buf[INET6_ADDRSTRLEN];
***************
*** 87,91 ****
! int set_plugin_boolean(const char *value, void *data, unsigned int addon __attribute__((unused)))
{
int *v = data;
--- 87,91 ----
! int set_plugin_boolean(const char *value, void *data, set_plugin_parameter_addon addon __attribute__((unused)))
{
int *v = data;
***************
*** 100,104 ****
}
! int set_plugin_int(const char *value, void *data, unsigned int addon __attribute__((unused)))
{
char *endptr;
--- 100,104 ----
}
! int set_plugin_int(const char *value, void *data, set_plugin_parameter_addon addon __attribute__((unused)))
{
char *endptr;
***************
*** 118,126 ****
}
! int set_plugin_string(const char *value, void *data, unsigned int addon)
{
if (data != NULL) {
char *v = data;
! if (strlen(value) >= addon) {
OLSR_PRINTF(0, "String too long \"%s\"", value);
return 1;
--- 118,126 ----
}
! int set_plugin_string(const char *value, void *data, set_plugin_parameter_addon addon)
{
if (data != NULL) {
char *v = data;
! if (strlen(value) >= addon.ui) {
OLSR_PRINTF(0, "String too long \"%s\"", value);
return 1;
Index: plugin_loader.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_loader.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** plugin_loader.c 30 Aug 2007 22:25:13 -0000 1.31
--- plugin_loader.c 17 Sep 2007 21:57:06 -0000 1.32
***************
*** 255,259 ****
/* we have found it! */
rc = entry->plugin_parameters[i].set_plugin_parameter(params->value, entry->plugin_parameters[i].data,
! 0 == entry->plugin_parameters[i].name[0] ? (unsigned int)params->key : entry->plugin_parameters[i].addon);
if (rc != 0) {
fprintf(stderr, "\nFatal error in plugin parameter \"%s\"/\"%s\"\n", params->key, params->value);
--- 255,259 ----
/* we have found it! */
rc = entry->plugin_parameters[i].set_plugin_parameter(params->value, entry->plugin_parameters[i].data,
! 0 == entry->plugin_parameters[i].name[0] ? (set_plugin_parameter_addon)params->key : entry->plugin_parameters[i].addon);
if (rc != 0) {
fprintf(stderr, "\nFatal error in plugin parameter \"%s\"/\"%s\"\n", params->key, params->value);
More information about the Olsr-cvs
mailing list