diff --git a/src/ccnl-core/src/ccnl-interest.c b/src/ccnl-core/src/ccnl-interest.c index 67d4b116..a17cf500 100644 --- a/src/ccnl-core/src/ccnl-interest.c +++ b/src/ccnl-core/src/ccnl-interest.c @@ -67,6 +67,11 @@ ccnl_interest_new(struct ccnl_relay_s *ccnl, struct ccnl_face_s *from, i->from = from; i->last_used = CCNL_NOW(); + /** default value for max_pit_entries is defined in ccn-iribu-defs.h as + * CCNL_DEFAULT_MAX_PIT_ENTRIES + * it is set to -1 (means infinity) for anything other than arduino, riot or android + * this code checks if max_pit_entries isn't defaulted to -1 and then compares its + * value against the pitcnt value */ if ((ccnl->max_pit_entries != -1) && (ccnl->pitcnt >= ccnl->max_pit_entries)) { ccnl_pkt_free(i->pkt); ccnl_free(i); diff --git a/src/ccnl-pkt/src/ccnl-pkt-ndntlv.c b/src/ccnl-pkt/src/ccnl-pkt-ndntlv.c index c1a0ecff..f51fac05 100644 --- a/src/ccnl-pkt/src/ccnl-pkt-ndntlv.c +++ b/src/ccnl-pkt/src/ccnl-pkt-ndntlv.c @@ -151,7 +151,7 @@ ccnl_ndntlv_bytes2pkt(uint64_t pkttype, uint8_t *start, pkt->s.ndntlv.maxsuffix = CCNL_MAX_NAME_COMP; /* set default lifetime, in case InterestLifetime guider is absent */ - pkt->s.ndntlv.interestlifetime = CCNL_INTEREST_TIMEOUT; + pkt->s.ndntlv.interestlifetime = CCNL_INTEREST_TIMEOUT * 1000; // ms oldpos = *data - start; while (ccnl_ndntlv_dehead(data, datalen, &typ, &len) == 0) {