]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_config.c
Merge 2-2
[netatalk.git] / etc / afpd / afp_config.c
index ed8067048da2e483bec545c8f61ba4580f5f9dd8..a61fe1022f551ccc84b9fef03c860cfe16c51a30 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);
@@ -141,7 +139,6 @@ int configinit(AFPObj *obj)
                fce_set_events(r);
     }
 
-
 EC_CLEANUP:
     if (q)
         free(q);