/[resiprocate]/main/resip/stack/test/testSipMessageMemory.cxx
ViewVC logotype

Diff of /main/resip/stack/test/testSipMessageMemory.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5948 by dworley, Fri Feb 17 15:30:16 2006 UTC revision 8161 by jmatthewsr, Fri Jul 25 20:54:42 2008 UTC
# Line 24  Line 24 
24     }     }
25    
26     {     {
27        cerr << "Testing raw header transfer" << endl;        resipCerr << "Testing raw header transfer" << endl;
28                
29        char *txt1 = "REGISTER sip:registrar.biloxi.com SIP/2.0\r\nVia: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7\r\nMax-Forwards: 70\r\nTo: Bob <sip:bob@biloxi.com>\r\nFrom: Bob <sip:bob@biloxi.com>;tag=456248\r\nCall-ID: 843817637684230@998sdasdh09\r\nCSeq: 1826 REGISTER\r\nContact: <sip:bob@192.0.2.4>\r\nExpires: 7200\r\nContent-Length: 0\r\n\r\n";        char *txt1 = "REGISTER sip:registrar.biloxi.com SIP/2.0\r\nVia: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7\r\nMax-Forwards: 70\r\nTo: Bob <sip:bob@biloxi.com>\r\nFrom: Bob <sip:bob@biloxi.com>;tag=456248\r\nCall-ID: 843817637684230@998sdasdh09\r\nCSeq: 1826 REGISTER\r\nContact: <sip:bob@192.0.2.4>\r\nExpires: 7200\r\nContent-Length: 0\r\n\r\n";
30    
# Line 37  Line 37 
37        assert(message2->getRawHeader(Headers::CSeq)->getParserContainer() == 0);        assert(message2->getRawHeader(Headers::CSeq)->getParserContainer() == 0);
38    
39        message1->setRawHeader(message2->getRawHeader(Headers::CSeq), Headers::CSeq);        message1->setRawHeader(message2->getRawHeader(Headers::CSeq), Headers::CSeq);
40        message1->encode(cerr) << endl;        message1->encode(resipCerr) << endl;
41        assert(message1->header(h_CSeq).sequence() == 6281);        assert(message1->header(h_CSeq).sequence() == 6281);
42     }     }
43    
44     {     {
45        cerr << "Testing raw header transfer post parse" << endl;        resipCerr << "Testing raw header transfer post parse" << endl;
46                
47        char *txt1 = "REGISTER sip:registrar.biloxi.com SIP/2.0\r\nVia: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7\r\nMax-Forwards: 70\r\nTo: Bob <sip:bob@biloxi.com>\r\nFrom: Bob <sip:bob@biloxi.com>;tag=456248\r\nCall-ID: 843817637684230@998sdasdh09\r\nCSeq: 1826 REGISTER\r\nContact: <sip:bob@192.0.2.4>\r\nExpires: 7200\r\nContent-Length: 0\r\n\r\n";        char *txt1 = "REGISTER sip:registrar.biloxi.com SIP/2.0\r\nVia: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7\r\nMax-Forwards: 70\r\nTo: Bob <sip:bob@biloxi.com>\r\nFrom: Bob <sip:bob@biloxi.com>;tag=456248\r\nCall-ID: 843817637684230@998sdasdh09\r\nCSeq: 1826 REGISTER\r\nContact: <sip:bob@192.0.2.4>\r\nExpires: 7200\r\nContent-Length: 0\r\n\r\n";
48    
# Line 62  Line 62 
62                
63        // should still work, but copies        // should still work, but copies
64        message1->setRawHeader(message2->getRawHeader(Headers::CSeq), Headers::CSeq);        message1->setRawHeader(message2->getRawHeader(Headers::CSeq), Headers::CSeq);
65        message1->encode(cerr) << endl;        message1->encode(resipCerr) << endl;
66        assert(message1->header(h_CSeq).sequence() == 6281);        assert(message1->header(h_CSeq).sequence() == 6281);
67    
68        // should have a parsed header        // should have a parsed header
69        assert(message1->getRawHeader(Headers::CSeq)->getParserContainer());        assert(message1->getRawHeader(Headers::CSeq)->getParserContainer());
70     }     }
71    
72     cout << "All OK" << endl;     resipCout << "All OK" << endl;
73     return 0;     return 0;
74  }  }
75    

Legend:
Removed from v.5948  
changed lines
  Added in v.8161

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27