aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-04-09 23:59:03 +0200
committerfiaxh <git@lightrise.org>2021-04-11 14:42:59 +0200
commitdfffa08ec16e16157df6e7036e09073a546d7552 (patch)
tree4e42223be646880cc0b9b938208a464231a57d23 /plugins
parent6ebdec1d78a7ad1b8668a2ba6eceb34515c75384 (diff)
downloaddino-dfffa08ec16e16157df6e7036e09073a546d7552.tar.gz
dino-dfffa08ec16e16157df6e7036e09073a546d7552.zip
Fix warnings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ice/src/dtls_srtp.vala13
-rw-r--r--plugins/ice/src/transport_parameters.vala2
2 files changed, 7 insertions, 8 deletions
diff --git a/plugins/ice/src/dtls_srtp.vala b/plugins/ice/src/dtls_srtp.vala
index e8fc01c7..6701fe89 100644
--- a/plugins/ice/src/dtls_srtp.vala
+++ b/plugins/ice/src/dtls_srtp.vala
@@ -23,10 +23,9 @@ public class Handler {
private X509.Certificate[] own_cert;
private X509.PrivateKey private_key;
- private Cond buffer_cond = new Cond();
- private Mutex buffer_mutex = new Mutex();
+ private Cond buffer_cond = Cond();
+ private Mutex buffer_mutex = Mutex();
private Gee.LinkedList<Bytes> buffer_queue = new Gee.LinkedList<Bytes>();
- private uint pull_timeout = uint.MAX;
private bool running = false;
private bool stop = false;
@@ -34,7 +33,7 @@ public class Handler {
private Crypto.Srtp.Session srtp_session = new Crypto.Srtp.Session();
- public uint8[] process_incoming_data(uint component_id, uint8[] data) {
+ public uint8[]? process_incoming_data(uint component_id, uint8[] data) {
if (srtp_session.has_decrypt) {
try {
if (component_id == 1) {
@@ -54,7 +53,7 @@ public class Handler {
return null;
}
- public uint8[] process_outgoing_data(uint component_id, uint8[] data) {
+ public uint8[]? process_outgoing_data(uint component_id, uint8[] data) {
if (srtp_session.has_encrypt) {
try {
if (component_id == 1) {
@@ -127,7 +126,7 @@ public class Handler {
buffer_mutex.unlock();
InitFlags server_or_client = mode == Mode.SERVER ? InitFlags.SERVER : InitFlags.CLIENT;
- debug("Setting up DTLS connection. We're %s", server_or_client.to_string());
+ debug("Setting up DTLS connection. We're %s", mode.to_string());
CertificateCredentials cert_cred = CertificateCredentials.create();
int err = cert_cred.set_x509_key(own_cert, private_key);
@@ -181,7 +180,7 @@ public class Handler {
warning("SRTP client/server key/salt null");
}
- debug("Finished DTLS connection. We're %s", server_or_client.to_string());
+ debug("Finished DTLS connection. We're %s", mode.to_string());
if (mode == Mode.SERVER) {
srtp_session.set_encryption_key(Crypto.Srtp.AES_CM_128_HMAC_SHA1_80, server_key.extract(), server_salt.extract());
srtp_session.set_decryption_key(Crypto.Srtp.AES_CM_128_HMAC_SHA1_80, client_key.extract(), client_salt.extract());
diff --git a/plugins/ice/src/transport_parameters.vala b/plugins/ice/src/transport_parameters.vala
index f854a367..6d160c62 100644
--- a/plugins/ice/src/transport_parameters.vala
+++ b/plugins/ice/src/transport_parameters.vala
@@ -111,7 +111,7 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport
}
private static DtlsSrtp.Handler setup_dtls(TransportParameters tp) {
- var weak_self = new WeakRef(tp);
+ var weak_self = WeakRef(tp);
DtlsSrtp.Handler dtls_srtp = DtlsSrtp.setup();
dtls_srtp.send_data.connect((data) => {
TransportParameters self = (TransportParameters) weak_self.get();