[Olsr-cvs] olsrd-current/lib/quagga/src olsrd_plugin.c, 1.2, 1.3 quagga.c, 1.2, 1.3 quagga.h, 1.1, 1.2
Bernd Petrovitsch
(spam-protected)
Mon Mar 12 00:26:09 CET 2007
Update of /cvsroot/olsrd/olsrd-current/lib/quagga/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24090/src
Modified Files:
olsrd_plugin.c quagga.c quagga.h
Log Message:
* another update from svn://dev.durchdieluft.net/olsr-quagga/trunk/quagga
Index: olsrd_plugin.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/olsrd_plugin.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** olsrd_plugin.c 11 Mar 2007 20:59:17 -0000 1.2
--- olsrd_plugin.c 11 Mar 2007 23:26:06 -0000 1.3
***************
*** 71,75 ****
}
else if (!strcmp(key, "Distance")) {
! unsigned int distance = atoi (key);
if (distance < 255)
zebra_olsr_distance(distance);
--- 71,75 ----
}
else if (!strcmp(key, "Distance")) {
! unsigned int distance = atoi (value);
if (distance < 255)
zebra_olsr_distance(distance);
***************
*** 78,84 ****
else if (!strcmp(key, "LocalPref")) {
! if (!strcmp(key, "true"))
zebra_olsr_localpref();
! else if (strcmp (key, "false"))
return -1;
return 1;
--- 78,84 ----
else if (!strcmp(key, "LocalPref")) {
! if (!strcmp(value, "true"))
zebra_olsr_localpref();
! else if (strcmp (value, "false"))
return -1;
return 1;
Index: quagga.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** quagga.h 31 Jan 2007 12:38:26 -0000 1.1
--- quagga.h 11 Mar 2007 23:26:06 -0000 1.2
***************
*** 48,52 ****
uint32_t *index;
uint32_t metric;
! uint32_t distance;
struct ipv4_route *next;
};
--- 48,52 ----
uint32_t *index;
uint32_t metric;
! uint8_t distance;
struct ipv4_route *next;
};
Index: quagga.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** quagga.c 11 Mar 2007 20:59:17 -0000 1.2
--- quagga.c 11 Mar 2007 23:26:06 -0000 1.3
***************
*** 156,160 ****
int init_zebra () {
! if (!zebra_connect()) {
olsr_exit ("AIIIII, could not connect to zebra! is zebra running?",
EXIT_FAILURE);
--- 156,160 ----
int init_zebra () {
! if (zebra_connect() < 0 || !(zebra.status&STATUS_CONNECTED)) {
olsr_exit ("AIIIII, could not connect to zebra! is zebra running?",
EXIT_FAILURE);
***************
*** 167,171 ****
int i;
! if (!zebra_connect())
// log: zebra-reconnect failed
;
--- 167,171 ----
int i;
! if (zebra_connect() < 0 || !(zebra.status&STATUS_CONNECTED))
// log: zebra-reconnect failed
;
***************
*** 356,360 ****
*optlen += r.ind_num * sizeof *r.index + 1;
if (r.message & ZAPI_MESSAGE_DISTANCE)
! *optlen++;
if (r.message & ZAPI_MESSAGE_METRIC)
*optlen += sizeof r.metric;
--- 356,360 ----
*optlen += r.ind_num * sizeof *r.index + 1;
if (r.message & ZAPI_MESSAGE_DISTANCE)
! (*optlen)++;
if (r.message & ZAPI_MESSAGE_METRIC)
*optlen += sizeof r.metric;
***************
*** 393,402 ****
t += sizeof r.index * r.ind_num;
}
if (r.message & ZAPI_MESSAGE_METRIC) {
memcpy (t, &r.metric, sizeof r.metric);
t += sizeof r.metric;
}
- if (r.message & ZAPI_MESSAGE_DISTANCE)
- *t++ = r.distance;
return cmdopt;
}
--- 393,402 ----
t += sizeof r.index * r.ind_num;
}
+ if (r.message & ZAPI_MESSAGE_DISTANCE)
+ *t++ = r.distance;
if (r.message & ZAPI_MESSAGE_METRIC) {
memcpy (t, &r.metric, sizeof r.metric);
t += sizeof r.metric;
}
return cmdopt;
}
More information about the Olsr-cvs
mailing list