#include "include/ctdl_module.h"
#include "serv_extensions.h"
+#include "config.h"
void vFreeRoomNetworkStruct(void *vOneRoomNetCfg);
void FreeRoomNetworkStructContent(OneRoomNetCfg *OneRNCfg);
*pOneRNCfg = NULL;
return 0;
}
+ fchown(fd, CTDLUID, (-1));
+ fchmod(fd, 0600);
+
if (*pOneRNCfg != NULL)
{
OneRNCfg = *pOneRNCfg;
(filedir_entry != NULL))
{
#ifdef _DIRENT_HAVE_D_NAMLEN
- d_namelen = filedir_entry->d_namelen;
+ d_namelen = filedir_entry->d_namlen;
#else
d_namelen = strlen(filedir_entry->d_name);
#endif
}
nptr = nptr->next;
}
+ i++;
}
return 0;
}
err_buf,
"IGNet Networking.",
2, strs, (long*) &lens,
+ CCC->cs_pid, 0,
time(NULL));
DeleteHash(&working_ignetcfg);
"IGNet Networking.",
2, strs,
(long*) &lens,
+ CCC->cs_pid, 0,
time(NULL));
DeleteHash(&working_ignetcfg);
void destroy_network_cfgs(void)
{
HashList *pCfgTypeHash = CfgTypeHash;
- HashList *pRoomConfigs = RoomConfigs;
+ HashList *pRoomConfigs;
- CfgTypeHash = NULL;
+ begin_critical_section(S_NETCONFIGS);
+ pRoomConfigs = RoomConfigs;
RoomConfigs = NULL;
-
- DeleteHash(&pCfgTypeHash);
+ end_critical_section(S_NETCONFIGS);
DeleteHash(&pRoomConfigs);
+
+ CfgTypeHash = NULL;
+ DeleteHash(&pCfgTypeHash);
}
/*