Jabberd14-1.6.0/jabberd/config.c/register_config

Last-modified: 2007-04-14 (土) 21:24:13

このページを編集する際は,編集に関する方針に従ってください.

概要

* register a function to handle that node in the config file

引数

* @param p memory pool used to allocate data belonging to this registration
* @param node the node that should be handled by the handler
* @param f the handler function that should be registered
* @param arg argument, that should be passed to the handler function

実装

void register_config(pool p, char *node, cfhandler f, void *arg) {
    cfg newg;
    /* create and setup */
    newg = pmalloco(p, sizeof(_cfg));
    newg->node = pstrdup(p,node);
    newg->f = f;
    newg->arg = arg;
    /* hook into global */
    newg->next = cfhandlers__;
    cfhandlers__ = newg;
}

呼出元

#related: relatedプラグインは廃止されました。