projects
/
project
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ce1c6d
)
Fix entry-update logic
author
Steven Barth
<steven@midlink.org>
Fri, 1 Feb 2013 12:01:09 +0000
(13:01 +0100)
committer
Steven Barth
<steven@midlink.org>
Fri, 1 Feb 2013 12:01:09 +0000
(13:01 +0100)
src/odhcp6c.c
patch
|
blob
|
history
diff --git
a/src/odhcp6c.c
b/src/odhcp6c.c
index 061cb42a607f7ac8e94f477c2eb0e6d466431f7d..9f7019da5a1ceb935f16a0476baa3ae635dbc224 100644
(file)
--- a/
src/odhcp6c.c
+++ b/
src/odhcp6c.c
@@
-409,10
+409,12
@@
void odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *n
new->valid = safe;
if (new->valid > 0) {
- if (x)
- *x = *new;
- else
+ if (x) {
+ x->valid = new->valid;
+ x->preferred = new->preferred;
+ } else {
odhcp6c_add_state(state, new, sizeof(*new));
+ }
} else if (x) {
odhcp6c_remove_state(state, (x - start) * sizeof(*x), sizeof(*x));
}