cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

removes redundant members from ccnl_content_s #305

Closed mfrey closed 5 years ago

mfrey commented 5 years ago

Contribution description

This PR removes the members freshnessperiod and status from struct ccnl_content_s. The freshness period indicates how long a node should wait after the arrival of the data packet before marking it “non-fresh”. The staleness is indicated in member stale in struct ccnl_content_s. The actual check is performed in function ccnl_do_ageing(void *ptr, void *dummy) in file ccnl-relay.c.

 740  if ((c->last_used + (c->pkt->s.ndntlv.freshnessperiod / 1000)) <= (uint32_t) t) {

The member freshnessperiod of struct ccnl_content_s is never modified or used after it was initialized in ccnl_content_new.

The member status is covered by member flags of type ccnl_content_flags.

Issues/PRs references

Fixes #304

mfrey commented 5 years ago

Please do not merge. The stale member also seems to be redundant. Updated PR description to reflect changes.