Fix warnings
This commit is contained in:
parent
6ebdec1d78
commit
dfffa08ec1
|
@ -170,7 +170,7 @@ public class ConnectionManager : Object {
|
|||
public async void disconnect_account(Account account) {
|
||||
if (connections.has_key(account)) {
|
||||
make_offline(account);
|
||||
connections[account].disconnect_account();
|
||||
connections[account].disconnect_account.begin();
|
||||
connections.unset(account);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,9 +112,8 @@ public class NotificationEvents : StreamInteractionModule, Object {
|
|||
|
||||
notifier.notify_call.begin(call, conversation, video, conversation_display_name);
|
||||
call.notify["state"].connect(() => {
|
||||
|
||||
if (call.state != Call.State.RINGING) {
|
||||
notifier.retract_call_notification(call, conversation);
|
||||
notifier.retract_call_notification.begin(call, conversation);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Dino {
|
|||
return participant.bare_jid.to_string();
|
||||
}
|
||||
|
||||
private static string? get_real_display_name(StreamInteractor stream_interactor, Account account, Jid jid, string? self_word = null) {
|
||||
public static string? get_real_display_name(StreamInteractor stream_interactor, Account account, Jid jid, string? self_word = null) {
|
||||
if (jid.equals_bare(account.bare_jid)) {
|
||||
if (self_word != null || account.alias == null || account.alias.length == 0) {
|
||||
return self_word;
|
||||
|
@ -50,7 +50,7 @@ namespace Dino {
|
|||
return null;
|
||||
}
|
||||
|
||||
private static string get_groupchat_display_name(StreamInteractor stream_interactor, Account account, Jid jid) {
|
||||
public static string get_groupchat_display_name(StreamInteractor stream_interactor, Account account, Jid jid) {
|
||||
MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY);
|
||||
string? room_name = muc_manager.get_room_name(account, jid);
|
||||
if (room_name != null && room_name != jid.localpart) {
|
||||
|
@ -72,7 +72,7 @@ namespace Dino {
|
|||
return jid.to_string();
|
||||
}
|
||||
|
||||
private static string get_occupant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid jid, string? self_word = null, bool muc_real_name = false) {
|
||||
public static string get_occupant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid jid, string? self_word = null, bool muc_real_name = false) {
|
||||
if (muc_real_name) {
|
||||
MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY);
|
||||
if (muc_manager.is_private_room(conversation.account, jid.bare_jid)) {
|
||||
|
|
|
@ -122,15 +122,15 @@ public static string get_participant_display_name(StreamInteractor stream_intera
|
|||
return Dino.get_participant_display_name(stream_interactor, conversation, participant, me_is_me ? _("Me") : null);
|
||||
}
|
||||
|
||||
private static string? get_real_display_name(StreamInteractor stream_interactor, Account account, Jid jid, bool me_is_me = false) {
|
||||
public static string? get_real_display_name(StreamInteractor stream_interactor, Account account, Jid jid, bool me_is_me = false) {
|
||||
return Dino.get_real_display_name(stream_interactor, account, jid, me_is_me ? _("Me") : null);
|
||||
}
|
||||
|
||||
private static string get_groupchat_display_name(StreamInteractor stream_interactor, Account account, Jid jid) {
|
||||
public static string get_groupchat_display_name(StreamInteractor stream_interactor, Account account, Jid jid) {
|
||||
return Dino.get_groupchat_display_name(stream_interactor, account, jid);
|
||||
}
|
||||
|
||||
private static string get_occupant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid jid, bool me_is_me = false, bool muc_real_name = false) {
|
||||
public static string get_occupant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid jid, bool me_is_me = false, bool muc_real_name = false) {
|
||||
return Dino.get_occupant_display_name(stream_interactor, conversation, jid, me_is_me ? _("Me") : null);
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -201,12 +201,6 @@ public class Xmpp.Xep.Jingle.Content : Object {
|
|||
stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.result(iq));
|
||||
}
|
||||
|
||||
void verify_content(ContentNode content) throws IqError {
|
||||
if (content.name != content_name || content.creator != content_creator) {
|
||||
throw new IqError.BAD_REQUEST("unknown content");
|
||||
}
|
||||
}
|
||||
|
||||
public void set_transport_connection(ComponentConnection? conn, uint8 component = 1) {
|
||||
debug(@"set_transport_connection: %s, %s, %i, %s, overwrites: %s", this.content_name, this.state.to_string(), component, (conn != null).to_string(), component_connections.has_key(component).to_string());
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ public abstract class Xmpp.Xep.JingleIceUdp.IceUdpTransportParameters : Jingle.T
|
|||
string? ufrag = node.get_attribute("ufrag");
|
||||
if (pwd != null) remote_pwd = pwd;
|
||||
if (ufrag != null) remote_ufrag = ufrag;
|
||||
uint8 components = 0;
|
||||
foreach (StanzaNode candidateNode in node.get_subnodes("candidate")) {
|
||||
remote_candidates.add(Candidate.parse(candidateNode));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue