NSIS-ka
A free C++ implementation of NSIS protocols

Changeset 4226


Ignore:
Timestamp:
Aug 11, 2009, 1:49:06 PM (8 years ago)
Author:
bless
Message:
  • removed memory leaks in r_entry->set_local_src() calls, fixed text of a DLog() message
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ntlp/trunk/src/ntlp_statemodule_responder.cpp

    r4210 r4226  
    7878  const hostaddress *src = dynamic_cast<const hostaddress *>(own_addr);
    7979  if (src->is_ip_unspec()) {
    80     DLog(param.name, "Couldn't determine own address on receive - using reverse lookup");
     80    DLog(param.name, "Couldn't determine own address on receipt - using reverse path forwarding lookup");
    8181    uint32_t pref = IPV6_PREFER_SRC_COA;
    8282    src = param.addresses.get_src_addr(*(dynamic_cast<const hostaddress *>(peer)), &pref);
    8383  }
    84   r_entry->set_local_src(*src->copy());
     84  r_entry->set_local_src(*src);
    8585
    8686  // save potentially present NAT Traversal payload in routing entry
     
    578578    src = param.addresses.get_src_addr(*(dynamic_cast<const hostaddress *>(peer)), &pref);
    579579  }
    580   r_entry->set_local_src(*src->copy());
     580  r_entry->set_local_src(*src);
    581581
    582582  if (translated_nli)
     
    12381238
    12391239  // test if we have a saved nat traversal object (NTO)
    1240   nattraversal* nto = dynamic_cast<nattraversal*>(r_entry->nattrav);
     1240  // we only need to send it back for an initial response, not for refreshing responses
     1241  nattraversal* nto = (r_entry->state == rn_querynslp) ? dynamic_cast<nattraversal*>(r_entry->nattrav) : NULL;
    12411242  NetMsg* ntobuf_p= NULL;
    12421243  // put NLI and NTO as transparent data into hash if present
     
    12941295  response* rsp = new response(mr, sid, nl, qc, rc, own_sp, own_sc, mydata);
    12951296
     1297  assert (rsp != NULL);
    12961298 
    12971299  if (nto) {
Note: See TracChangeset for help on using the changeset viewer.