Compare commits
1 Commits
2c8bd867b9
...
c9455d27ba
| Author | SHA1 | Date | |
|---|---|---|---|
|
c9455d27ba
|
@@ -749,18 +749,11 @@ connection_get_user(void)
|
||||
return connection_get_jid()->localpart;
|
||||
}
|
||||
|
||||
// NULL 'from' means the server (RFC 6120 §8.1.2.1)
|
||||
static const char*
|
||||
_get_from_via_jid(const char* const jid)
|
||||
{
|
||||
return jid ? jid : conn.domain;
|
||||
}
|
||||
|
||||
void
|
||||
connection_features_received(const char* const jid)
|
||||
{
|
||||
log_info("[CONNECTION] connection_features_received %s", jid);
|
||||
const char* key = _get_from_via_jid(jid);
|
||||
const char* key = jid ? jid : conn.domain; // g_str_hash crashes on NULL; NULL 'from' means the server (RFC 6120 §8.1.2.1)
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
@@ -772,7 +765,7 @@ connection_features_received(const char* const jid)
|
||||
GHashTable*
|
||||
connection_get_features(const char* const jid)
|
||||
{
|
||||
const char* key = _get_from_via_jid(jid);
|
||||
const char* key = jid ? jid : conn.domain;
|
||||
if (!key || !conn.features_by_jid) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user