Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156919
b: refs/heads/master
c: c6ba973
h: refs/heads/master
i:
  156917: 33c3b4c
  156915: a87398a
  156911: 5ca3b01
v: v3
  • Loading branch information
Ralf Baechle authored and David S. Miller committed Aug 18, 2009
1 parent 229a375 commit f72cea5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68eac4602b9104cdaa6c18b3edd914cececa6a1e
refs/heads/master: c6ba973b8fa97422aab4204f7d79f1d413cde925
21 changes: 12 additions & 9 deletions trunk/net/netrom/nr_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,23 +630,23 @@ struct net_device *nr_dev_get(ax25_address *addr)
return dev;
}

static ax25_digi *nr_call_to_digi(int ndigis, ax25_address *digipeaters)
static ax25_digi *nr_call_to_digi(ax25_digi *digi, int ndigis,
ax25_address *digipeaters)
{
static ax25_digi ax25_digi;
int i;

if (ndigis == 0)
return NULL;

for (i = 0; i < ndigis; i++) {
ax25_digi.calls[i] = digipeaters[i];
ax25_digi.repeated[i] = 0;
digi->calls[i] = digipeaters[i];
digi->repeated[i] = 0;
}

ax25_digi.ndigi = ndigis;
ax25_digi.lastrepeat = -1;
digi->ndigi = ndigis;
digi->lastrepeat = -1;

return &ax25_digi;
return digi;
}

/*
Expand All @@ -656,6 +656,7 @@ int nr_rt_ioctl(unsigned int cmd, void __user *arg)
{
struct nr_route_struct nr_route;
struct net_device *dev;
ax25_digi digi;
int ret;

switch (cmd) {
Expand All @@ -673,13 +674,15 @@ int nr_rt_ioctl(unsigned int cmd, void __user *arg)
ret = nr_add_node(&nr_route.callsign,
nr_route.mnemonic,
&nr_route.neighbour,
nr_call_to_digi(nr_route.ndigis, nr_route.digipeaters),
nr_call_to_digi(&digi, nr_route.ndigis,
nr_route.digipeaters),
dev, nr_route.quality,
nr_route.obs_count);
break;
case NETROM_NEIGH:
ret = nr_add_neigh(&nr_route.callsign,
nr_call_to_digi(nr_route.ndigis, nr_route.digipeaters),
nr_call_to_digi(&digi, nr_route.ndigis,
nr_route.digipeaters),
dev, nr_route.quality);
break;
default:
Expand Down

0 comments on commit f72cea5

Please sign in to comment.