/[resiprocate]/main/resip/dum/MergedRequestKey.cxx
ViewVC logotype

Annotation of /main/resip/dum/MergedRequestKey.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3295 - (hide annotations) (download)
Tue Aug 31 21:52:23 2004 UTC (15 years, 3 months ago) by derek
Original Path: main/sip/resiprocate/dum/MergedRequestKey.cxx
File size: 1375 byte(s)
MergedRequest key no longer throws when messages don't have a from tag.
Automatic ack transmission happens before onAnswer when processing a 2xx to a re-invite(different for late media)
1 jason 2879 #include "resiprocate/dum/MergedRequestKey.hxx"
2     #include "resiprocate/SipMessage.hxx"
3     #include "resiprocate/CSeqCategory.hxx"
4    
5     using namespace resip;
6    
7     const MergedRequestKey MergedRequestKey::Empty;
8    
9     MergedRequestKey::MergedRequestKey()
10     {
11     }
12    
13     MergedRequestKey::MergedRequestKey(const SipMessage& req) :
14     mRequestUri(Data::from(req.header(h_RequestLine).uri())),
15     mCseq(Data::from(req.header(h_CSeq))),
16 derek 3295 mTag(req.header(h_From).exists(p_tag) ? req.header(h_From).param(p_tag) : Data::Empty),
17 jason 2879 mCallId(req.header(h_CallID).value())
18     {
19     }
20    
21     bool
22     MergedRequestKey::operator==(const MergedRequestKey& other) const
23     {
24     return (mCallId == other.mCallId &&
25     mTag == other.mTag &&
26     mCseq == other.mCseq &&
27     mRequestUri == other.mRequestUri);
28     }
29    
30     bool
31     MergedRequestKey::operator!=(const MergedRequestKey& other) const
32     {
33     return !(*this == other);
34     }
35    
36     bool
37     MergedRequestKey::operator<(const MergedRequestKey& other) const
38     {
39     if ( mCallId < other.mCallId)
40     {
41     return true;
42     }
43     else if (mCallId > other.mCallId)
44     {
45     return false;
46     }
47    
48     if (mTag < other.mTag)
49     {
50     return true;
51     }
52     else if (mTag > other.mTag)
53     {
54     return false;
55     }
56    
57     if (mCseq < other.mCseq)
58     {
59     return true;
60     }
61     else if (mCseq > other.mCseq)
62     {
63     return false;
64     }
65    
66     return (mRequestUri < other.mRequestUri);
67     }
68    

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27