diff options
author | Marvin W <git@larma.de> | 2021-03-23 15:07:51 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2021-03-23 15:11:00 +0100 |
commit | c8a37c02462f3eef2c6d26fbfbe2079da1b7a34f (patch) | |
tree | eef9ab7d8a7389b429e3e980a784875f183edb54 /plugins/ice | |
parent | b393d4160182873ea2acd9fbc6421f7e1a3adb9e (diff) | |
download | dino-c8a37c02462f3eef2c6d26fbfbe2079da1b7a34f.tar.gz dino-c8a37c02462f3eef2c6d26fbfbe2079da1b7a34f.zip |
Make foundation a string
Diffstat (limited to 'plugins/ice')
-rw-r--r-- | plugins/ice/src/transport_parameters.vala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/ice/src/transport_parameters.vala b/plugins/ice/src/transport_parameters.vala index acb44852..467b3674 100644 --- a/plugins/ice/src/transport_parameters.vala +++ b/plugins/ice/src/transport_parameters.vala @@ -209,8 +209,7 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport Nice.Candidate candidate = new Nice.Candidate(type); candidate.component_id = c.component; char[] foundation = new char[Nice.CANDIDATE_MAX_FOUNDATION]; - string foundation_str = c.foundation.to_string(); - Memory.copy(foundation, foundation_str.data, foundation_str.length); + Memory.copy(foundation, c.foundation.data, size_t.min(c.foundation.length, Nice.CANDIDATE_MAX_FOUNDATION - 1)); candidate.foundation = foundation; candidate.addr = Nice.Address(); candidate.addr.init(); @@ -237,7 +236,7 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport default: assert_not_reached(); } candidate.component = (uint8) nc.component_id; - candidate.foundation = (uint8) int.parse((string)nc.foundation); + candidate.foundation = ((string)nc.foundation).dup(); candidate.generation = 0; candidate.id = Random.next_int().to_string("%08x"); // TODO |