pulse: avoid node lookup when connecting

We can use the node name directly if we strip the .monitor suffix
or remove the MONITOR flag form the name/id.
This commit is contained in:
Wim Taymans 2020-10-24 16:58:01 +02:00
parent ec860d64cf
commit 8ac9ce7947
4 changed files with 23 additions and 25 deletions

View file

@ -170,14 +170,6 @@ const char *pa_context_find_global_name(pa_context *c, uint32_t id)
return name;
}
static inline bool pa_endswith(const char *s, const char *sfx)
{
size_t l1, l2;
l1 = strlen(s);
l2 = strlen(sfx);
return l1 >= l2 && pa_streq(s + l1 - l2, sfx);
}
struct global *pa_context_find_global_by_name(pa_context *c, uint32_t mask, const char *name)
{
struct global *g;