* libax25-0.0.12-rc2 patch
@ 2009-10-18 11:41 bernard pidoux
0 siblings, 0 replies; only message in thread
From: bernard pidoux @ 2009-10-18 11:41 UTC (permalink / raw)
To: linux-hams, Ralf Baechle, Thomas Osterried DL9SAU
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
Hi,
I noticed that "official" libax25 does not include patches introduced
into my "unofficial" libax25 versions a few months ago.
Thus, I send here the first set from my own work on libax25 .
* BUG in proc_ax25 structure timers members size declared in
procutils.h. Since in kernel 2.6 the timers are now in
milliseconds,
they need more place to be saved (unsigned short --> unsigned
long).
Corrected, together with functions reading proc files in
procutils.c.
* BUG in procutils.h and procutils.c
in structure proc_rs_neigh field "use" was missing,
in function read_proc_rs_neigh proc_rs_neigh use was not read,
-- Bernard Pidoux <f6bvp@amsat.org> Jun 1 2008
[-- Attachment #2: libax25-0.0.12-rc2_procutils.patch --]
[-- Type: text/plain, Size: 5163 bytes --]
--- libax25-0.0.12-rc2/netax25/procutils.h 2009-06-21 00:53:51.000000000 +0200
+++ libax25-0.0.12-rc2/netax25/procutils.h 2008-07-10 21:32:18.000000000 +0200
@@ -55,13 +55,13 @@
int ndigi;
unsigned char st;
unsigned short vs, vr, va;
- unsigned short t1, t1timer, t2, t2timer, t3, t3timer;
- unsigned short idle, idletimer;
- unsigned char n2, n2count;
- unsigned short rtt;
+ unsigned long t1timer, t1, t2timer, t2, t3timer, t3;
+ unsigned long idletimer, idle;
+ unsigned char n2count, n2;
+ unsigned long rtt;
unsigned char window;
unsigned short paclen;
- unsigned long sndq, rcvq;
+ unsigned short sndq, rcvq;
unsigned long inode;
struct proc_ax25 *next;
@@ -73,11 +73,11 @@
char my_circuit[6], ur_circuit[6];
unsigned char st;
unsigned short vs, vr, va;
- unsigned short t1, t1timer, t2, t2timer, t4, t4timer;
- unsigned short idle, idletimer;
- unsigned char n2, n2count;
+ unsigned long t1timer, t1, t2timer, t2, t4timer, t4;
+ unsigned long idletimer, idle;
+ unsigned char n2count, n2;
unsigned char window;
- unsigned long sndq, rcvq;
+ unsigned short sndq, rcvq;
unsigned long inode;
struct proc_nr *next;
@@ -120,33 +120,34 @@
};
struct proc_rs_route {
- unsigned short lci1;
+ unsigned short lci1;
char address1[11], call1[10];
- unsigned int neigh1;
- unsigned short lci2;
+ unsigned int neigh1;
+ unsigned short lci2;
char address2[11], call2[10];
- unsigned int neigh2;
+ unsigned int neigh2;
struct proc_rs_route *next;
};
struct proc_rs_neigh {
- int addr;
+ int addr;
char call[10];
char dev[14];
- int count;
+ unsigned int count;
+ unsigned int use;
char mode[4];
char restart[4];
- unsigned short t0, tf;
+ unsigned short t0, tf;
struct proc_rs_neigh *next;
};
struct proc_rs_nodes {
char address[11];
- unsigned char mask;
- unsigned char n;
- unsigned int neigh1, neigh2, neigh3;
+ unsigned char mask;
+ unsigned char n;
+ unsigned int neigh1, neigh2, neigh3;
struct proc_rs_nodes *next;
};
--- libax25-0.0.12-rc2/procutils.c 2009-06-21 00:54:50.000000000 +0200
+++ libax25-0.0.12-rc2/procutils.c 2008-07-10 21:32:18.000000000 +0200
@@ -117,22 +121,22 @@
p->vr = safe_atoi(token(&cp, space));
p->va = safe_atoi(token(&cp, space));
- p->t1timer = safe_atoi(token(&cp, space));
- p->t1 = safe_atoi(token(&cp, space));
+ p->t1timer = safe_atox(token(&cp, space));
+ p->t1 = safe_atox(token(&cp, space));
- p->t2timer = safe_atoi(token(&cp, space));
- p->t2 = safe_atoi(token(&cp, space));
+ p->t2timer = safe_atox(token(&cp, space));
+ p->t2 = safe_atox(token(&cp, space));
- p->t3timer = safe_atoi(token(&cp, space));
- p->t3 = safe_atoi(token(&cp, space));
+ p->t3timer = safe_atox(token(&cp, space));
+ p->t3 = safe_atox(token(&cp, space));
- p->idletimer = safe_atoi(token(&cp, space));
- p->idle = safe_atoi(token(&cp, space));
+ p->idletimer = safe_atox(token(&cp, space));
+ p->idle = safe_atox(token(&cp, space));
p->n2count = safe_atoi(token(&cp, space));
p->n2 = safe_atoi(token(&cp, space));
- p->rtt = safe_atoi(token(&cp, space));
+ p->rtt = safe_atox(token(&cp, space));
p->window = safe_atoi(token(&cp, space));
@@ -141,7 +145,7 @@
p->sndq = safe_atoi(token(&cp, space));
p->rcvq = safe_atoi(token(&cp, space));
- p->inode = safe_atoi(token(&cp, space));
+ p->inode = safe_atox(token(&cp, space));
p->next = list;
list = p;
@@ -244,21 +248,21 @@
p->vr = safe_atoi(token(&cp, space));
p->va = safe_atoi(token(&cp, space));
- p->t1timer = safe_atoi(token(&cp, "/"));
- p->t1 = safe_atoi(token(&cp, "/ \t\r\n"));
- p->t2timer = safe_atoi(token(&cp, "/"));
- p->t2 = safe_atoi(token(&cp, "/ \t\r\n"));
- p->t4timer = safe_atoi(token(&cp, "/"));
- p->t4 = safe_atoi(token(&cp, "/ \t\r\n"));
- p->idletimer = safe_atoi(token(&cp, "/"));
- p->idle = safe_atoi(token(&cp, "/ \t\r\n"));
+ p->t1timer = safe_atox(token(&cp, "/"));
+ p->t1 = safe_atox(token(&cp, "/ \t\r\n"));
+ p->t2timer = safe_atox(token(&cp, "/"));
+ p->t2 = safe_atox(token(&cp, "/ \t\r\n"));
+ p->t4timer = safe_atox(token(&cp, "/"));
+ p->t4 = safe_atox(token(&cp, "/ \t\r\n"));
+ p->idletimer = safe_atox(token(&cp, "/"));
+ p->idle = safe_atox(token(&cp, "/ \t\r\n"));
p->n2count = safe_atoi(token(&cp, "/"));
p->n2 = safe_atoi(token(&cp, "/ \t\r\n"));
p->window = safe_atoi(token(&cp, space));
p->sndq = safe_atoi(token(&cp, space));
p->rcvq = safe_atoi(token(&cp, space));
- p->inode = safe_atoi(token(&cp, space));
+ p->inode = safe_atox(token(&cp, space));
p->next = list;
list = p;
@@ -495,6 +499,7 @@
safe_strncpy(p->call, strtok(NULL, " \t\n\r"), 9);
safe_strncpy(p->dev, strtok(NULL, " \t\n\r"), 13);
p->count = safe_atoi(strtok(NULL, " \t\n\r"));
+ p->use = safe_atoi(strtok(NULL, " \t\n\r"));
safe_strncpy(p->mode, strtok(NULL, " \t\n\r"), 3);
safe_strncpy(p->restart, strtok(NULL, " \t\n\r"), 3);
p->t0 = safe_atoi(strtok(NULL, " \t\n\r"));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-18 11:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-18 11:41 libax25-0.0.12-rc2 patch bernard pidoux
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.