diff --git a/src/pulsecore/autoload.c b/src/pulsecore/autoload.c
index 4486660..3909e81 100644
|
a
|
b
|
|
| 100 | 100 | return 0; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | | int pa_autoload_remove_by_name(pa_core *c, const char*name, pa_namereg_type_t type) { |
| | 103 | int pa_autoload_remove_by_name(pa_core *c, const char*name, const char*module, pa_namereg_type_t type) { |
| 104 | 104 | pa_autoload_entry *e; |
| 105 | 105 | assert(c && name && module && (type == PA_NAMEREG_SINK || type == PA_NAMEREG_SOURCE)); |
| 106 | 106 | |
diff --git a/src/pulsecore/autoload.h b/src/pulsecore/autoload.h
index 3cd597b..bf885e2 100644
|
a
|
b
|
|
| 46 | 46 | |
| 47 | 47 | /* Free all autoload entries */ |
| 48 | 48 | void pa_autoload_free(pa_core *c); |
| 49 | | int pa_autoload_remove_by_name(pa_core *c, const char*name, pa_namereg_type_t type); |
| | 49 | int pa_autoload_remove_by_name(pa_core *c, const char*name, const char*module, pa_namereg_type_t type); |
| 50 | 50 | int pa_autoload_remove_by_index(pa_core *c, uint32_t idx); |
| 51 | 51 | |
| 52 | 52 | /* Request an autoload entry by its name, effectively causing a module to be loaded */ |
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index 069f053..0e50e34 100644
|
a
|
b
|
|
| 95 | 95 | static int pa_cli_command_play_file(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail); |
| 96 | 96 | static int pa_cli_command_autoload_list(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail); |
| 97 | 97 | static int pa_cli_command_autoload_add(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail); |
| 98 | | static int pa_cli_command_autoload_remove(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail); |
| | 98 | static int pa_cli_command_autoload_remove(pa_core *c, pa_tokenizer *t, const char*module, pa_strbuf *buf, int *fail); |
| 99 | 99 | static int pa_cli_command_dump(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail); |
| 100 | 100 | static int pa_cli_command_list_props(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail); |
| 101 | 101 | static int pa_cli_command_move_sink_input(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail); |
| … |
… |
|
| 728 | 728 | return 0; |
| 729 | 729 | } |
| 730 | 730 | |
| 731 | | static int pa_cli_command_autoload_remove(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail) { |
| | 731 | static int pa_cli_command_autoload_remove(pa_core *c, pa_tokenizer *t, const char*module, pa_strbuf *buf, int *fail) { |
| 732 | 732 | const char *name; |
| 733 | 733 | assert(c && t && buf && fail); |
| 734 | 734 | |
| … |
… |
|
| 737 | 737 | return -1; |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | | if (pa_autoload_remove_by_name(c, name, strstr(pa_tokenizer_get(t, 0), "sink") ? PA_NAMEREG_SINK : PA_NAMEREG_SOURCE) < 0) { |
| | 740 | if (pa_autoload_remove_by_name(c, name, module, strstr(pa_tokenizer_get(t, 0), "sink") ? PA_NAMEREG_SINK : PA_NAMEREG_SOURCE) < 0) { |
| 741 | 741 | pa_strbuf_puts(buf, "Failed to remove autload entry\n"); |
| 742 | 742 | return -1; |
| 743 | 743 | } |
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 87a4b91..a7ffd99 100644
|
a
|
b
|
|
| 2081 | 2081 | CHECK_VALIDITY(c->pstream, !name || (*name && pa_utf8_valid(name) && (type == 0 || type == 1)), tag, PA_ERR_INVALID); |
| 2082 | 2082 | |
| 2083 | 2083 | if (name) |
| 2084 | | r = pa_autoload_remove_by_name(c->protocol->core, name, type == 0 ? PA_NAMEREG_SINK : PA_NAMEREG_SOURCE); |
| | 2084 | r = pa_autoload_remove_by_name(c->protocol->core, name, c->protocol->module, type == 0 ? PA_NAMEREG_SINK : PA_NAMEREG_SOURCE); |
| 2085 | 2085 | else |
| 2086 | 2086 | r = pa_autoload_remove_by_index(c->protocol->core, idx); |
| 2087 | 2087 | |