Make adcnet a pointer.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 20 Dec 2006 03:18:15 +0000 (03:18 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 20 Dec 2006 03:18:15 +0000 (03:18 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@779 959494ce-11ee-0310-bf91-de5d638817bd

daemon/fnet-adc.c

index 1357257..2fb9de8 100644 (file)
@@ -376,7 +376,7 @@ static int hubreqconn(struct fnetpeer *peer)
     return(0);
 }
 
-static struct fnet adcnet = {
+static struct fnet adcnet_store = {
     .connect = hubconnect,
     .destroy = hubdestroy,
     .setnick = hubsetnick,
@@ -384,6 +384,8 @@ static struct fnet adcnet = {
     .name = L"adc"
 };
 
+static struct fnet *adcnet = &adcnet_store;
+
 static int run(void)
 {
     int ret;
@@ -394,7 +396,7 @@ static int run(void)
     ret = 0;
     for(fn = fnetnodes; fn != NULL; fn = nextfn) {
        nextfn = fn->next;
-       if(fn->fnet != &adcnet)
+       if(fn->fnet != adcnet)
            continue;
        if((hub = fn->data) == NULL)
            continue;
@@ -413,7 +415,7 @@ static void preinit(int hup)
 {
     if(hup)
        return;
-    regfnet(&adcnet);
+    regfnet(adcnet);
 }
 
 static int init(int hup)