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

Changeset 4554


Ignore:
Timestamp:
Oct 14, 2009, 1:50:59 PM (8 years ago)
Author:
roehricht
Message:
  • Use BOUND_SESSION_ID if present in process_query_msg()
  • Removed redundant code
  • Use is_last_signaling_hop() in case no context is available
File:
1 edited

Legend:

Unmodified
Added
Removed
  • qos-nslp/trunk/src/QoS_StateModule.cpp

    r4535 r4554  
    330330
    331331  bound_sessionid* send_bs = NULL;
    332   bound_sessionid* bs = NULL;
    333332  bool found = false;
    334333  ILog(state_manager::modname, "process_query_msg()");
     
    437436  } // end if context found
    438437  else {
     438    bound_sessionid* bound_session_id = NULL;
    439439    // no context so far
    440440    if (rcvd_b_sid) {
    441       bs = new bound_sessionid(*rcvd_b_sid);
    442     }
    443     else {
    444       if (send_bs) {
    445         bs = new bound_sessionid(*send_bs);
    446       }
     441      bound_session_id = new bound_sessionid(*rcvd_b_sid);
    447442    }
    448443
     
    452447      // if it RII is present, it cannot have the R flag set
    453448      ILog(state_manager::modname, "RII existing!");
    454       // XXX: this test should be "is_last_signaling_hop(rcvd_mri)" ?!?
    455       if (type == NSLP_Context::QNR) {
     449      if (is_last_signaling_hop(rcvd_mri)) {
    456450        send_response_to_query(r, q, !down, rcvd_sid, rcvd_mri);
    457451      }
     
    461455        }
    462456        else {
     457          // set BOUND_SESSION_ID for QUERY if present
     458          if (bound_session_id)
     459            query->set_bound_sid(bound_session_id);
    463460          forward_query_msg(query, down, rcvd_sid, rcvd_mri);
    464461        }
     
    507504        }
    508505
     506        // set BOUND_SESSION_ID for QUERY if present
     507        if (bound_session_id)
     508          query->set_bound_sid(bound_session_id);
    509509        forward_query_msg(query, down, rcvd_sid, rcvd_mri);
    510510      }
Note: See TracChangeset for help on using the changeset viewer.