Allow nulls in txt entry for rend registration

This commit is contained in:
Ron Pedde 2006-04-26 03:29:43 +00:00
parent 1ca265d4c5
commit f6bab734d1
3 changed files with 10 additions and 5 deletions

View File

@ -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++;
}
}

View File

@ -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 */

View File

@ -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 */