fix: Correct handling of create_fulljid without resource
If resource was NULL/"" we otherwise had a trailing slash.
This commit is contained in:
@@ -250,7 +250,11 @@ gchar*
|
|||||||
create_fulljid(const gchar* const barejid, const gchar* const resource)
|
create_fulljid(const gchar* const barejid, const gchar* const resource)
|
||||||
{
|
{
|
||||||
auto_gchar gchar* barejidlower = g_utf8_strdown(barejid, -1);
|
auto_gchar gchar* barejidlower = g_utf8_strdown(barejid, -1);
|
||||||
return g_strdup_printf("%s/%s", barejidlower, resource);
|
if (resource && strlen(resource) > 0) {
|
||||||
|
return g_strdup_printf("%s/%s", barejidlower, resource);
|
||||||
|
} else {
|
||||||
|
return g_strdup(barejidlower);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user