diff options
author | Colin Guthrie <pulse@colin.guthr.ie> | 2008-06-24 23:50:12 +0100 |
---|---|---|
committer | Colin Guthrie <pulse@colin.guthr.ie> | 2008-06-25 00:00:46 +0100 |
commit | 5099ab7b8b758cb5d1fd3438eb83d8d0c96b3e97 (patch) | |
tree | 7f92445c704d88e54ad44a61dc1908bc7914fa8e /src | |
parent | ac032549cd7eba9459f1fcd8983f1d513913f14f (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/namereg.c | 4 | ||||
-rw-r--r-- | src/pulsecore/namereg.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c index cc18adab9..38d308c1f 100644 --- a/src/pulsecore/namereg.c +++ b/src/pulsecore/namereg.c @@ -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; } diff --git a/src/pulsecore/namereg.h b/src/pulsecore/namereg.h index af0153ecc..b460382f3 100644 --- a/src/pulsecore/namereg.h +++ b/src/pulsecore/namereg.h @@ -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 |