mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
Allow nulls in txt entry for rend registration
This commit is contained in:
parent
1ca265d4c5
commit
f6bab734d1
11
src/plugin.c
11
src/plugin.c
@ -48,7 +48,7 @@ typedef struct tag_pluginentry {
|
||||
char *versionstring;
|
||||
regex_t regex;
|
||||
void *functions;
|
||||
PLUGIN_REND_INFO **rend_info;
|
||||
PLUGIN_REND_INFO *rend_info;
|
||||
struct tag_pluginentry *next;
|
||||
} PLUGIN_ENTRY;
|
||||
|
||||
@ -325,6 +325,7 @@ void plugin_url_handle(WS_CONNINFO *pwsc) {
|
||||
int plugin_rend_register(char *name, int port, char *iface) {
|
||||
PLUGIN_ENTRY *ppi;
|
||||
PLUGIN_REND_INFO *pri;
|
||||
char *txt;
|
||||
|
||||
_plugin_readlock();
|
||||
ppi = _plugin_list.next;
|
||||
@ -332,10 +333,14 @@ int plugin_rend_register(char *name, int port, char *iface) {
|
||||
while(ppi) {
|
||||
DPRINTF(E_DBG,L_PLUG,"Checking %s\n",ppi->versionstring);
|
||||
if(ppi->rend_info) {
|
||||
pri = *(ppi->rend_info);
|
||||
pri = ppi->rend_info;
|
||||
while(pri->type) {
|
||||
txt = pri->txt;
|
||||
if(!pri->txt)
|
||||
txt = "";
|
||||
|
||||
DPRINTF(E_DBG,L_PLUG,"Registering %s\n",pri->type);
|
||||
rend_register(name,pri->type,port,iface,pri->txt);
|
||||
rend_register(name,pri->type,port,iface,txt);
|
||||
pri++;
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ typedef struct tag_plugin_info {
|
||||
char *url; /* for output plugins */
|
||||
void *handler_functions;
|
||||
void *pi; /* exported functions */
|
||||
PLUGIN_REND_INFO **rend_info;
|
||||
PLUGIN_REND_INFO *rend_info;
|
||||
} PLUGIN_INFO;
|
||||
|
||||
/* version 1 plugin imports */
|
||||
|
@ -35,7 +35,7 @@ typedef struct tag_plugin_info {
|
||||
char *url; /* regex of namespace to handle if OUTPUT type */
|
||||
void *handler_functions;
|
||||
void *fn; /* input functions*/
|
||||
PLUGIN_REND_INFO **rend_info;
|
||||
PLUGIN_REND_INFO *rend_info;
|
||||
} PLUGIN_INFO;
|
||||
|
||||
/* xml helpers for output plugins */
|
||||
|
Loading…
Reference in New Issue
Block a user