Added pvt pointer argument to parse_error in the plugin interface
This commit is contained in:
committed by
Michael Davidsaver
parent
926246a495
commit
f8e9a7643a
@@ -362,7 +362,7 @@ static void parse_abort(chFilter *filter) {
|
||||
chfFilter *f = (chfFilter*) filter->puser;
|
||||
|
||||
/* Call the plugin to tell it we're aborting */
|
||||
if (p->pif->parse_error) p->pif->parse_error();
|
||||
if (p->pif->parse_error) p->pif->parse_error(f->puser);
|
||||
if (p->pif->freePvt) p->pif->freePvt(f->puser);
|
||||
freeInstanceData(f);
|
||||
}
|
||||
@@ -376,7 +376,7 @@ static parse_result parse_end(chFilter *filter)
|
||||
/* Check if all required arguments were supplied */
|
||||
for(i = 0; i < (p->nopts/32)+1; i++) {
|
||||
if ((f->found[i] & p->required[i]) != p->required[i]) {
|
||||
if (p->pif->parse_error) p->pif->parse_error();
|
||||
if (p->pif->parse_error) p->pif->parse_error(f->puser);
|
||||
if (p->pif->freePvt) p->pif->freePvt(f->puser);
|
||||
freeInstanceData(f);
|
||||
return parse_stop;
|
||||
|
||||
@@ -109,8 +109,10 @@ typedef struct chfPluginIf {
|
||||
/** @brief A parsing error occurred.
|
||||
*
|
||||
* <em>Called after parsing failed with an error.</em>
|
||||
*
|
||||
* @param pvt Pointer to private structure.
|
||||
*/
|
||||
void (* parse_error) (void);
|
||||
void (* parse_error) (void *pvt);
|
||||
|
||||
/** @brief Configuration has been parsed successfully.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user