Make foundation a string
This commit is contained in:
parent
b393d41601
commit
c8a37c0246
|
@ -209,8 +209,7 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport
|
||||||
Nice.Candidate candidate = new Nice.Candidate(type);
|
Nice.Candidate candidate = new Nice.Candidate(type);
|
||||||
candidate.component_id = c.component;
|
candidate.component_id = c.component;
|
||||||
char[] foundation = new char[Nice.CANDIDATE_MAX_FOUNDATION];
|
char[] foundation = new char[Nice.CANDIDATE_MAX_FOUNDATION];
|
||||||
string foundation_str = c.foundation.to_string();
|
Memory.copy(foundation, c.foundation.data, size_t.min(c.foundation.length, Nice.CANDIDATE_MAX_FOUNDATION - 1));
|
||||||
Memory.copy(foundation, foundation_str.data, foundation_str.length);
|
|
||||||
candidate.foundation = foundation;
|
candidate.foundation = foundation;
|
||||||
candidate.addr = Nice.Address();
|
candidate.addr = Nice.Address();
|
||||||
candidate.addr.init();
|
candidate.addr.init();
|
||||||
|
@ -237,7 +236,7 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport
|
||||||
default: assert_not_reached();
|
default: assert_not_reached();
|
||||||
}
|
}
|
||||||
candidate.component = (uint8) nc.component_id;
|
candidate.component = (uint8) nc.component_id;
|
||||||
candidate.foundation = (uint8) int.parse((string)nc.foundation);
|
candidate.foundation = ((string)nc.foundation).dup();
|
||||||
candidate.generation = 0;
|
candidate.generation = 0;
|
||||||
candidate.id = Random.next_int().to_string("%08x"); // TODO
|
candidate.id = Random.next_int().to_string("%08x"); // TODO
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ using Xmpp;
|
||||||
|
|
||||||
public class Xmpp.Xep.JingleIceUdp.Candidate {
|
public class Xmpp.Xep.JingleIceUdp.Candidate {
|
||||||
public uint8 component;
|
public uint8 component;
|
||||||
public uint8 foundation;
|
public string foundation;
|
||||||
public uint8 generation;
|
public uint8 generation;
|
||||||
public string id;
|
public string id;
|
||||||
public string ip;
|
public string ip;
|
||||||
|
@ -19,7 +19,7 @@ public class Xmpp.Xep.JingleIceUdp.Candidate {
|
||||||
public static Candidate parse(StanzaNode node) throws Jingle.IqError {
|
public static Candidate parse(StanzaNode node) throws Jingle.IqError {
|
||||||
Candidate candidate = new Candidate();
|
Candidate candidate = new Candidate();
|
||||||
candidate.component = (uint8) node.get_attribute_uint("component");
|
candidate.component = (uint8) node.get_attribute_uint("component");
|
||||||
candidate.foundation = (uint8) node.get_attribute_uint("foundation");
|
candidate.foundation = (string) node.get_attribute("foundation");
|
||||||
candidate.generation = (uint8) node.get_attribute_uint("generation");
|
candidate.generation = (uint8) node.get_attribute_uint("generation");
|
||||||
candidate.id = node.get_attribute("id");
|
candidate.id = node.get_attribute("id");
|
||||||
candidate.ip = node.get_attribute("ip");
|
candidate.ip = node.get_attribute("ip");
|
||||||
|
|
Loading…
Reference in a new issue