/[resiprocate]/main/resip/dum/test/testIdentity.cxx
ViewVC logotype

Diff of /main/resip/dum/test/testIdentity.cxx

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

branches/b-identity-0505/dum/test/testIdentity.cxx revision 4564 by greg, Mon May 9 23:57:12 2005 UTC main/sip/resiprocate/dum/test/testIdentity.cxx revision 4740 by daniel, Tue May 24 21:30:57 2005 UTC
# Line 22  Line 22 
22  #include "resiprocate/os/Logger.hxx"  #include "resiprocate/os/Logger.hxx"
23  #include "resiprocate/os/Subsystem.hxx"  #include "resiprocate/os/Subsystem.hxx"
24    
25    #ifdef WIN32
26    #include "resiprocate/WinSecurity.hxx"
27    #endif
28    
29  #include <iostream>  #include <iostream>
30  #include <string>  #include <string>
31  #include <sstream>  #include <sstream>
# Line 66  Line 70 
70           InfoLog( << "ServerPagerMessageHandler::onMessageArrived: "           InfoLog( << "ServerPagerMessageHandler::onMessageArrived: "
71                    << *body << "\n" );                    << *body << "\n" );
72                    
73             const SecurityAttributes *attr = message.getSecurityAttributes();
74             InfoLog( << *attr );
75            
76           _rcvd = true;           _rcvd = true;
77        }        }
78    
# Line 137  Line 144 
144     bool first = true;     bool first = true;
145     NameAddr userAor(argv[1]);     NameAddr userAor(argv[1]);
146     Data passwd(argv[2]);     Data passwd(argv[2]);
    int port = 25060;  
147    
148     InfoLog(<< "user: " << userAor << ", passwd: " << passwd << "\n");     InfoLog(<< "user: " << userAor << ", passwd: " << passwd << "\n");
149    
150     Security* security = new Security("certs");  #ifdef WIN32
151       WinSecurity* security = new WinSecurity;
152     try  #else
153     {     Security* security = new Security;
154        assert(security != 0);  #endif
       security->preload();  
    }  
    catch( ... )  
    {  
       ErrLog( << "Got a exception loading certificates" );  
    }  
155    
156     assert( security );     assert( security );
157    
158     SipStack clientStack(security);     SipStack clientStack(security);
159     DialogUsageManager clientDum(clientStack);     DialogUsageManager clientDum(clientStack);
160     clientDum.addTransport(UDP, port);     clientDum.addTransport(UDP, 10000 + rand()&0x7fff, V4);
161       clientDum.addTransport(TCP, 10000 + rand()&0x7fff, V4);
162       clientDum.addTransport(TLS, 10000 + rand()&0x7fff, V4);
163       // clientDum.addTransport(UDP, 10000 + rand()&0x7fff, V6);
164       // clientDum.addTransport(TCP, 10000 + rand()&0x7fff, V6);
165       // clientDum.addTransport(TLS, 10000 + rand()&0x7fff, V6);
166    
167     MasterProfile clientProfile;       MasterProfile clientProfile;  
168     auto_ptr<ClientAuthManager> clientAuth(new ClientAuthManager());       auto_ptr<ClientAuthManager> clientAuth(new ClientAuthManager());  
# Line 186  Line 191 
191     InfoLog( << regMessage << "Generated register: " << endl << regMessage );     InfoLog( << regMessage << "Generated register: " << endl << regMessage );
192     clientDum.send( regMessage );     clientDum.send( regMessage );
193    
    int n = 0;  
           
194     while (!clientHandler.isEnded() || !clientHandler.isRcvd() )     while (!clientHandler.isEnded() || !clientHandler.isRcvd() )
195     {     {
196        FdSet fdset;        FdSet fdset;

Legend:
Removed from v.4564  
changed lines
  Added in v.4740

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27