]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_config.c
creatvol() must return a struct vol pointer
[netatalk.git] / etc / afpd / afp_config.c
index ed8067048da2e483bec545c8f61ba4580f5f9dd8..fa7da0c9816679975cd9de02722dd3192e546d89 100644 (file)
@@ -60,13 +60,13 @@ void configfree(AFPObj *obj, DSI *dsi)
         close(p->socket);
         free(p);
     }
+
     if (dsi) {
         dsi->next = NULL;
         obj->dsi = dsi;
     } else {
         afp_options_free(&obj->options);
     }
-
 }
 
 /*!
@@ -102,6 +102,7 @@ int configinit(AFPObj *obj)
         status_init(obj, dsi);
         *next = dsi;
         next = &dsi->next;
+        dsi->AFPobj = obj;
 
         LOG(log_note, logtype_afpd, "Netatalk AFP/TCP listening on %s:%d",
             getip_string((struct sockaddr *)&dsi->server),
@@ -114,9 +115,6 @@ int configinit(AFPObj *obj)
             break;
     }
 
-    if (obj->dsi == NULL)
-        EC_FAIL;
-
 #ifdef HAVE_LDAP
     /* Parse afp.conf */
     acl_ldap_readconfig(obj->iniconfig);
@@ -124,7 +122,7 @@ int configinit(AFPObj *obj)
 
     /* Now register with zeroconf, we also need the volumes for that */
     if (! (obj->options.flags & OPTION_NOZEROCONF)) {
-        load_volumes(obj, NULL);
+        load_volumes(obj);
         zeroconf_register(obj);
     }
 
@@ -141,7 +139,6 @@ int configinit(AFPObj *obj)
                fce_set_events(r);
     }
 
-
 EC_CLEANUP:
     if (q)
         free(q);