diff -r 28433f06d5ee -r afd57ce39ec9 src/server/public/nsapi.h --- a/src/server/public/nsapi.h Mon Jul 01 18:05:13 2013 +0200 +++ b/src/server/public/nsapi.h Mon Jul 08 11:10:54 2013 +0200 @@ -683,17 +683,24 @@ PRNetAddr *pr_local_addr; }; + +typedef struct FuncStruct FuncStruct; + /* * FuncPtr is a pointer to an NSAPI SAF function */ #ifdef XP_UNIX typedef int Func(pblock *, Session *, Request *); +// new func executor +typedef int FuncExec(FuncStruct *, pblock *, Session *, Request *); #else /* XP_WIN32 */ typedef int _cdecl Func(pblock *, Session *, Request *); +typedef int _cdecl uncExec(FuncStruct *, pblock *, Session *, Request *); #endif /* XP_WIN32 */ -typedef Func *FuncPtr; +typedef Func *FuncPtr; +typedef FuncExec *FuncExecPtr; /* * FuncStruct is a structure used in the static declaration of the @@ -701,12 +708,12 @@ * startup. */ -typedef struct FuncStruct FuncStruct; - struct FuncStruct { - const char * name; - FuncPtr func; - struct FuncStruct *next; + const char *name; + FuncPtr func; + //struct FuncStruct *next; + FuncExecPtr func_exec; + void *exec_data; unsigned flags; unsigned poolID; unsigned pool_resolved; @@ -1352,8 +1359,9 @@ // func util functions FuncStruct* func_resolve(pblock *pb, Session *sn, Request *rq); -int func_exec (pblock *pb, Session *sn, Request *rq); - +int func_exec(pblock *pb, Session *sn, Request *rq); +struct FuncStruct func_insert(char *name, FuncPtr fn); +#define func_insert func_insert void protocol_status(Session *sn, Request *rq, int n, const char *m);