close(p->socket);
free(p);
}
+
if (dsi) {
dsi->next = NULL;
obj->dsi = dsi;
} else {
afp_options_free(&obj->options);
}
-
}
/*!
{
EC_INIT;
DSI *dsi, **next = &obj->dsi;
- char *p = NULL, *q = NULL;
+ char *p = NULL, *q = NULL, *savep;
const char *r;
auth_load(obj->options.uampath, obj->options.uamlist);
if (obj->options.listen) {
EC_NULL( q = p = strdup(obj->options.listen) );
- EC_NULL( p = strtok(p, ", ") );
+ EC_NULL( p = strtok_r(p, ", ", &savep) );
}
while (1) {
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),
if (p)
/* p is NULL if ! obj->options.listen */
- p = strtok(NULL, ", ");
+ p = strtok_r(NULL, ", ", &savep);
if (!p)
break;
}
- if (obj->dsi == NULL)
- EC_FAIL;
-
#ifdef HAVE_LDAP
/* Parse afp.conf */
acl_ldap_readconfig(obj->iniconfig);
zeroconf_register(obj);
}
- if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fcelistener", NULL))) {
+ if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce listener", NULL))) {
LOG(log_note, logtype_afpd, "Adding FCE listener: %s", r);
fce_add_udp_socket(r);
}
- if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fcecoalesce", NULL))) {
+ if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce coalesce", NULL))) {
LOG(log_note, logtype_afpd, "Fce coalesce: %s", r);
fce_set_coalesce(r);
}
- if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fceevents", NULL))) {
+ if ((r = iniparser_getstring(obj->iniconfig, INISEC_GLOBAL, "fce events", NULL))) {
LOG(log_note, logtype_afpd, "Fce events: %s", r);
fce_set_events(r);
}
-
EC_CLEANUP:
if (q)
free(q);