From: Florian Forster Date: Sun, 15 Mar 2009 10:41:20 +0000 (+0100) Subject: src/liboping.c: When setting the TTL, update all existing pinghost_t, too. X-Git-Tag: liboping-1.1.0~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0b8f964038a9f8dc4345a2d73115567216e6e202;p=liboping.git src/liboping.c: When setting the TTL, update all existing pinghost_t, too. --- diff --git a/src/liboping.c b/src/liboping.c index 65b2ef5..4f7d955 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -1041,6 +1041,13 @@ int ping_setopt (pingobj_t *obj, int option, void *value) obj->ttl = PING_DEF_TTL; ret = -1; } + else + { + pinghost_t *ph; + + for (ph = obj->head; ph != NULL; ph = ph->next) + ping_set_ttl (ph, obj->ttl); + } break; case PING_OPT_AF: