Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp_s10n.c @ 2210:ea90906cb691
Add a few more checks
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 23 Oct 2015 20:47:26 +0200 |
parents | e6d355e50d7a |
children | f5402d705f67 |
comparison
equal
deleted
inserted
replaced
2209:412322678d59 | 2210:ea90906cb691 |
---|---|
28 | 28 |
29 // xmpp_send_s10n(jid, subtype) | 29 // xmpp_send_s10n(jid, subtype) |
30 // Send a s10n message with the passed subtype | 30 // Send a s10n message with the passed subtype |
31 void xmpp_send_s10n(const char *bjid, LmMessageSubType type) | 31 void xmpp_send_s10n(const char *bjid, LmMessageSubType type) |
32 { | 32 { |
33 if (G_UNLIKELY(!bjid || !*bjid)) { | |
34 scr_LogPrint(LPRINT_LOGNORM, "Empty JID."); | |
35 return; | |
36 } | |
33 LmMessage *x = lm_message_new_with_sub_type(bjid, | 37 LmMessage *x = lm_message_new_with_sub_type(bjid, |
34 LM_MESSAGE_TYPE_PRESENCE, | 38 LM_MESSAGE_TYPE_PRESENCE, |
35 type); | 39 type); |
36 lm_connection_send(lconnection, x, NULL); | 40 lm_connection_send(lconnection, x, NULL); |
37 lm_message_unref(x); | 41 lm_message_unref(x); |