]> code.citadel.org Git - citadel.git/blobdiff - webcit/netconf.c
* follow api-change in several places
[citadel.git] / webcit / netconf.c
index 521c765a78ed0dadd892d9e8ea222d4476d9132a..bd48e76315cc3263d919493a74d277381ad16fee 100644 (file)
@@ -81,7 +81,7 @@ void SerializeNode(NodeConf *Node, StrBuf *Buf)
 }
 
 
-HashList *load_netconf(WCTemplateToken *Token)
+HashList *load_netconf(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
        StrBuf *Buf;
        HashList *Hash;
@@ -138,7 +138,7 @@ void save_net_conf(HashList *Nodelist)
        serv_getln(buf, sizeof buf);
        if (buf[0] == '4') {
                if ((Nodelist != NULL) && (GetCount(Nodelist) > 0)) {
-                       where = GetNewHashPos();
+                       where = GetNewHashPos(Nodelist, 0);
                        Buf = NewStrBuf();
                        while (GetNextHashPos(Nodelist, where, &KeyLen, &Key, &vNode)) {
                                Node = (NodeConf*) vNode;
@@ -183,7 +183,7 @@ void edit_node(void) {
                        return;
                }
                        
-               NodeConfig = load_netconf(NULL);
+               NodeConfig = load_netconf(NULL, 0, NULL, NULL, CTX_NONE);
                Put(NodeConfig, ChrPtr(Index), StrLength(Index), NewNode, DeleteNodeConf);
                save_net_conf(NodeConfig);
                DeleteHash(&NodeConfig);
@@ -282,7 +282,7 @@ void display_edit_node(void)
                return;
        }
 
-       NodeConfig = load_netconf(NULL);
+       NodeConfig = load_netconf(NULL, 0, NULL, NULL, CTX_NONE);
        if (!GetHash(NodeConfig, ChrPtr(Index), StrLength(Index), &vNode) || 
            (vNode == NULL)) {
                sprintf(WC->ImportantMessage, _("Invalid Parameter"));
@@ -477,7 +477,7 @@ void delete_node(void)
                return;
        }
 
-       NodeConfig = load_netconf(NULL);
+       NodeConfig = load_netconf(NULL, 0, NULL, NULL, CTX_NONE);
        if (!GetHash(NodeConfig, ChrPtr(Index), StrLength(Index), &vNode) || 
            (vNode == NULL)) {
                sprintf(WC->ImportantMessage, _("Invalid Parameter"));
@@ -540,6 +540,6 @@ InitModule_NETCONF
        WebcitAddUrlHandler(HKEY("display_confirm_delete_node"), display_confirm_delete_node, 0);
        WebcitAddUrlHandler(HKEY("delete_node"), delete_node, 0);
        WebcitAddUrlHandler(HKEY("display_add_node"), display_add_node, 0);
-       RegisterIterator("NODECONFIG", 0, NULL, load_netconf, NodeCfgSubst, DeleteHash, CTX_NODECONF);
+       RegisterIterator("NODECONFIG", 0, NULL, load_netconf, NodeCfgSubst, DeleteHash, CTX_NODECONF, CTX_NONE);
 }
 /*@}*/