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

Changeset 4501


Ignore:
Timestamp:
Sep 30, 2009, 2:04:48 PM (8 years ago)
Author:
stud-dettling
Message:

Only some nits

Location:
qos-nslp/branches/20090610-qos-nslp-aho/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • qos-nslp/branches/20090610-qos-nslp-aho/src/ProcessingModule.cpp

    r4500 r4501  
    473473
    474474        if (nslp_data == NULL) {
     475if(r_mri->get_mrm() == mri::mri_t_pathcoupled) {
    475476                DLog(param.name, "SII handle is " << sii);
    476477                DLog("ProcessingModule", "NN status is: " << apimsg->get_msgstatus());
     
    479480                        statemodule.process_sii_handle(sii, down, rcvd_sid, rcvd_mri, apimsg->get_msgstatus());
    480481                }
     482}
    481483        } else {
    482484                uchar* nslp_buf = nslp_data->get_buffer();
  • qos-nslp/branches/20090610-qos-nslp-aho/src/QoS_StateModule.cpp

    r4500 r4501  
    213213*/
    214214state_manager::error_t
    215 state_manager::process_tp_recv_est_msg(NetMsg& msg, known_nslp_pdu*& respdu, const ntlp::sessionid* sid,
     215state_manager::process_tp_recv_est_msg(NetMsg& netmsg, known_nslp_pdu*& resultpdu, const ntlp::sessionid* sid,
    216216                                  const ntlp::mri_explicitsigtarget* rcvd_mri)
    217217{
    218         return state_manager::error_wrong_pdu_type;
     218        // initialize result variables
     219        resultpdu = NULL;
     220//      error_t nslpres;
     221//      nslpres = error_ok;
     222
     223        // parse NetMsg
     224        IEErrorList errorlist;
     225        uint32 nbytesread = 0;
     226        protlib::IE* tmpie = NSLP_IEManager::instance()->deserialize(netmsg, NSLP_IE::cat_known_nslp_pdu, coding, errorlist, nbytesread, true);
     227        DLog(state_manager::modname, "process_tp_recv_est_msg(): deserialization completed (" << nbytesread << " bytes).");
     228
     229        nslp_pdu* pdu = (tmpie != NULL) ? dynamic_cast<nslp_pdu*>(tmpie) : NULL;
     230
     231        // known_pdu contains parsed objects
     232        known_nslp_pdu* known_pdu = pdu ? dynamic_cast<known_nslp_pdu*>(pdu) : NULL;
     233
     234        assert(pdu != NULL);
     235        assert(known_pdu != NULL);
     236
     237        DLog(state_manager::modname, "process_tp_recv_est_msg() - " << color[blue] << "received " << known_pdu->get_name() << color[off]);
     238
     239/*
     240        if (known_pdu->is_reserve()) {
     241                DLog(state_manager::modname, "Received RESERVE message by the EST-MRM.");
     242                return error_nothing_to_do;
     243        }
     244
     245        if (known_pdu->is_response()) {
     246                DLog(state_manager::modname, "Received RESPONSE message by the EST-MRM.");
     247                return error_nothing_to_do;
     248        }
     249
     250        if (known_pdu->is_query()) {
     251                DLog(state_manager::modname, "Received QUERY message by the EST-MRM.");
     252                return error_nothing_to_do;
     253        }
     254
     255        if (known_pdu->is_notify()) {
     256                DLog(state_manager::modname, "Received NOTIFY message by the EST-MRM.");
     257                return error_nothing_to_do;
     258        }
     259*/
     260
     261//      return state_manager::error_wrong_pdu_type;
     262        return state_manager::error_nothing_to_do;
    219263}
    220264
  • qos-nslp/branches/20090610-qos-nslp-aho/src/qosnslpd.cpp

    r3703 r4501  
    368368                */
    369369
    370                 /*
    371370                TestConsoleParam testcon_par(4, "localhost", "30023");
    372                 ThreadStarter<TestConsole, TestConsoleParam> appl_thread(1, testcon_par);
    373                 */
     371                ThreadStarter<TestConsole, TestConsoleParam> appl_thread2(1, testcon_par);
    374372
    375373                FastQueue* applmsgrecv_fq = new FastQueue("applmsgchecker",true);
     
    378376                appl_thread.start_processing();
    379377                udstpthread.start_processing();
     378                appl_thread2.start_processing();
    380379
    381380                // to garantee real good random numbers - do srand()
     
    410409
    411410                // stop threads
     411                appl_thread2.stop_processing();
    412412                appl_thread.stop_processing();
    413413                udstpthread.stop_processing();
     
    419419
    420420                EVLog("QoS NSLP Daemon", "Stopped processing of all threads");
     421                appl_thread2.abort_processing();
    421422                appl_thread.abort_processing();
    422423                udstpthread.abort_processing();
Note: See TracChangeset for help on using the changeset viewer.