@@ -33,9 +33,10 @@ class UDPPort : public Port {
3333 rtc::Network* network,
3434 rtc::AsyncPacketSocket* socket,
3535 const std::string& username,
36- const std::string& password) {
37- UDPPort* port =
38- new UDPPort (thread, factory, network, socket, username, password);
36+ const std::string& password,
37+ const std::string& origin) {
38+ UDPPort* port = new UDPPort (thread, factory, network, socket,
39+ username, password, origin);
3940 if (!port->Init ()) {
4041 delete port;
4142 port = NULL ;
@@ -50,15 +51,18 @@ class UDPPort : public Port {
5051 uint16 min_port,
5152 uint16 max_port,
5253 const std::string& username,
53- const std::string& password) {
54- UDPPort* port = new UDPPort (thread, factory, network, ip, min_port,
55- max_port, username, password);
54+ const std::string& password,
55+ const std::string& origin) {
56+ UDPPort* port = new UDPPort (thread, factory, network,
57+ ip, min_port, max_port,
58+ username, password, origin);
5659 if (!port->Init ()) {
5760 delete port;
5861 port = NULL ;
5962 }
6063 return port;
6164 }
65+
6266 virtual ~UDPPort ();
6367
6468 rtc::SocketAddress GetLocalAddress () const {
@@ -105,14 +109,16 @@ class UDPPort : public Port {
105109 uint16 min_port,
106110 uint16 max_port,
107111 const std::string& username,
108- const std::string& password);
112+ const std::string& password,
113+ const std::string& origin);
109114
110115 UDPPort (rtc::Thread* thread,
111116 rtc::PacketSocketFactory* factory,
112117 rtc::Network* network,
113118 rtc::AsyncPacketSocket* socket,
114119 const std::string& username,
115- const std::string& password);
120+ const std::string& password,
121+ const std::string& origin);
116122
117123 bool Init ();
118124
@@ -208,9 +214,12 @@ class StunPort : public UDPPort {
208214 uint16 min_port, uint16 max_port,
209215 const std::string& username,
210216 const std::string& password,
211- const ServerAddresses& servers) {
212- StunPort* port = new StunPort (thread, factory, network, ip, min_port,
213- max_port, username, password, servers);
217+ const ServerAddresses& servers,
218+ const std::string& origin) {
219+ StunPort* port = new StunPort (thread, factory, network,
220+ ip, min_port, max_port,
221+ username, password, servers,
222+ origin);
214223 if (!port->Init ()) {
215224 delete port;
216225 port = NULL ;
@@ -233,9 +242,10 @@ class StunPort : public UDPPort {
233242 uint16 max_port,
234243 const std::string& username,
235244 const std::string& password,
236- const ServerAddresses& servers)
245+ const ServerAddresses& servers,
246+ const std::string& origin)
237247 : UDPPort(thread, factory, network, ip, min_port, max_port, username,
238- password) {
248+ password, origin ) {
239249 // UDPPort will set these to local udp, updating these to STUN.
240250 set_type (STUN_PORT_TYPE);
241251 set_server_addresses (servers);
0 commit comments