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

Changeset 4230


Ignore:
Timestamp:
Aug 11, 2009, 1:55:22 PM (8 years ago)
Author:
bless
Message:
  • fixed printout of messages: added nattraversal in query and response, cout was used instead of os when <empty>
Location:
ntlp/trunk/src/pdu
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ntlp/trunk/src/pdu/confirm.cpp

    r2926 r4230  
    9292        if (get_stackconf()) print_object(stackconf_ptr,os,level,indent,objects,"StackConfigurationData");
    9393        if (get_nslpdata()) print_object(nslpdata_ptr,os,level,indent,objects,"NSLP Data");
    94         if (!objects) cout<<" <empty>";
     94        if (!objects) os <<" <empty>";
    9595        return os;
    9696} // end print
  • ntlp/trunk/src/pdu/nattraversal.cpp

    r4210 r4230  
    406406       
    407407
    408     os << "MRI-Length:   " << (int) embedded_mri->get_serialized_size(protocol_v1)-4 << " bytes" << endl;
     408    os << "MRI-Length:   " << (int) (embedded_mri ?  embedded_mri->get_serialized_size(protocol_v1)-4 : 0) << " bytes" << endl;
    409409   
    410410    os << "Type-Count:   " << (int) translated_object_types.size() << endl;
     
    415415    // print MRI
    416416   
    417     embedded_mri->print(os, level, indent);
     417    if (embedded_mri)
     418            embedded_mri->print(os, level, indent);
     419    else
     420            os << "- (missing)" << endl;
    418421   
    419422    os << "Translated object types: ";
     
    425428    }
    426429    os << endl;
     430    os << "Opaque NAT information objects: ";
    427431
    428432    // iterate nat_information, 
  • ntlp/trunk/src/pdu/ntlp_error.cpp

    r2548 r4230  
    8181        if (get_nli()) print_object(nli_ptr,os,level,indent,objects,"NLI");
    8282        print_object(errorobject_ptr,os,level,indent,objects,"Error Data");
    83         if (!objects) cout<<" <empty>";
     83        if (!objects) os <<" <empty>";
    8484        return os;
    8585} // end print
  • ntlp/trunk/src/pdu/query.cpp

    r4108 r4230  
    8585        level++;
    8686        os<<setw(level*indent)<<"";
    87         os<<"NSLP ID: " <<  nslpid;
     87        os<<"NSLP ID: " <<  nslpid << endl;
     88        if (get_nattraversal()) print_object(nattrav_ptr,os,level,indent,objects,"NAT traversal object");
    8889        if (get_mri()) print_object(mri_ptr,os,level,indent,objects,"Message Routing Information");
    8990        if (get_sessionid()) print_object(sessionid_ptr,os,level,indent,objects,"SessionID");
     
    9394        if (get_stackconf()) print_object(stackconf_ptr,os,level,indent,objects,"StackConfigurationData");
    9495        if (get_nslpdata()) print_object(nslpdata_ptr,os,level,indent,objects,"NSLP Data");
    95         if (!objects) cout<<" <empty>";
     96        if (!objects) os <<" <empty>";
    9697        return os;
    9798} // end print
  • ntlp/trunk/src/pdu/response.cpp

    r2926 r4230  
    8686        level++;
    8787        os<<setw(level*indent)<<"";
    88         os<<"NSLP ID: " << nslpid;
     88        os<<"NSLP ID: " << nslpid << endl;
     89        if (get_nattraversal()) print_object(nattrav_ptr,os,level,indent,objects,"NAT traversal object");
    8990        if (get_mri()) print_object(mri_ptr,os,level,indent,objects,"Message Routing Information");
    9091        if (get_sessionid()) print_object(sessionid_ptr,os,level,indent,objects,"SessionID");
     
    9596        if (get_stackconf()) print_object(stackconf_ptr,os,level,indent,objects,"StackConfigurationData");
    9697        if (get_nslpdata()) print_object(nslpdata_ptr,os,level,indent,objects,"NSLP Data");
    97         if (!objects) cout<<" <empty>";
     98        if (!objects) os <<" <empty>";
    9899        return os;
    99100} // end print
     
    162163void response::clear_pointers() {
    163164        known_ntlp_pdu::clear_pointers();
     165        arr.clear(nattrav_ptr,false);
    164166        arr.clear(mri_ptr,false);
    165167        arr.clear(sessionid_ptr,false);
Note: See TracChangeset for help on using the changeset viewer.