Bug 970569 - Fix crasher introduced by bug 928930. r=bwc

This commit is contained in:
EKR 2014-02-10 14:45:42 -08:00
parent aa641b6b8c
commit 62b42b7427
2 changed files with 6 additions and 6 deletions

View File

@ -189,14 +189,14 @@ static nr_ice_crypto_vtbl nr_ice_crypto_nss_vtbl = {
nsresult NrIceStunServer::ToNicerStunStruct(nr_ice_stun_server *server,
const char *transport) const {
const std::string &transport) const {
int r;
int transport_int;
memset(server, 0, sizeof(nr_ice_stun_server));
if (strcmp(transport, kNrIceTransportUdp) == 0) {
if (transport == kNrIceTransportUdp) {
transport_int = IPPROTO_UDP;
} else if (strcmp(transport, kNrIceTransportTcp) == 0) {
} else if (transport == kNrIceTransportTcp) {
transport_int = IPPROTO_TCP;
} else {
MOZ_ASSERT(false);

View File

@ -102,8 +102,8 @@ class NrIceStunServer {
return server.forget();
}
nsresult ToNicerStunStruct(nr_ice_stun_server *server,
const char* transport =
nsresult ToNicerStunStruct(nr_ice_stun_server* server,
const std::string& transport =
kNrIceTransportUdp) const;
protected:
@ -161,7 +161,7 @@ class NrIceTurnServer : public NrIceStunServer {
std::string username_;
std::vector<unsigned char> password_;
const char* transport_;
std::string transport_;
};
class NrIceCtx {