Export the cleanup_name() function and rename it to pa_namereg_make_valid_name().

This will allow it to be used by modules to create valid sink names.
This commit is contained in:
Colin Guthrie 2008-06-24 23:50:12 +01:00
parent ac032549cd
commit 5099ab7b8b
2 changed files with 3 additions and 2 deletions

View file

@ -70,7 +70,7 @@ pa_bool_t pa_namereg_is_valid_name(const char *name) {
return TRUE;
}
static char* cleanup_name(const char *name) {
const char* pa_namereg_make_valid_name(const char *name) {
const char *a;
char *b, *n;
@ -114,7 +114,7 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
if (fail)
return NULL;
if (!(name = n = cleanup_name(name)))
if (!(name = n = pa_namereg_make_valid_name(name)))
return NULL;
}

View file

@ -44,5 +44,6 @@ const char *pa_namereg_get_default_sink_name(pa_core *c);
const char *pa_namereg_get_default_source_name(pa_core *c);
pa_bool_t pa_namereg_is_valid_name(const char *name);
const char* pa_namereg_make_valid_name(const char *name);
#endif