From: Wilfried Goesgens Date: Mon, 7 Oct 2013 19:03:40 +0000 (+0200) Subject: fix dnamlen, they missed the e, so we need to follow. X-Git-Tag: v9.01~222 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=f88d67da640fc36def6a9c7e14e6e0ac793273a9 fix dnamlen, they missed the e, so we need to follow. --- diff --git a/citadel/config.c b/citadel/config.c index 25b7f66e2..3d6527f38 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -228,14 +228,16 @@ void put_config(void) FILE *cfp; int blocks_written = 0; - if ((cfp = fopen(file_citadel_config, "w")) != NULL) { + cfp = fopen(file_citadel_config, "w"); + if (cfp != NULL) { blocks_written = fwrite((char *) &config, sizeof(struct config), 1, cfp); if (blocks_written == 1) { - fclose(cfp); chown(file_citadel_config, CTDLUID, (-1)); chmod(file_citadel_config, 0600); + fclose(cfp); return; } + fclose(cfp); } syslog(LOG_EMERG, "%s: %s", file_citadel_config, strerror(errno)); } diff --git a/citadel/modules/bio/serv_bio.c b/citadel/modules/bio/serv_bio.c index 041485d93..ea88b87d3 100644 --- a/citadel/modules/bio/serv_bio.c +++ b/citadel/modules/bio/serv_bio.c @@ -113,7 +113,7 @@ void cmd_lbio(char *cmdbuf) (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); diff --git a/citadel/modules/ctdlproto/serv_rooms.c b/citadel/modules/ctdlproto/serv_rooms.c index 2755da816..deeeb8133 100644 --- a/citadel/modules/ctdlproto/serv_rooms.c +++ b/citadel/modules/ctdlproto/serv_rooms.c @@ -427,7 +427,7 @@ void cmd_rdir(char *cmdbuf) if (strcasecmp(filedir_entry->d_name, "filedir") && filedir_entry->d_name[0] != '.') { #ifdef _DIRENT_HAVE_D_NAMELEN - d_namelen = filedir_entry->d_namelen; + d_namelen = filedir_entry->d_namlen; #else d_namelen = strlen(filedir_entry->d_name); #endif diff --git a/citadel/modules/network/serv_netspool.c b/citadel/modules/network/serv_netspool.c index e5ca89a4d..62afec686 100644 --- a/citadel/modules/network/serv_netspool.c +++ b/citadel/modules/network/serv_netspool.c @@ -720,7 +720,7 @@ void network_do_spoolin(HashList *working_ignetcfg, HashList *the_netmap, int *n (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); @@ -824,7 +824,7 @@ void network_consolidate_spoolout(HashList *working_ignetcfg, HashList *the_netm (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); diff --git a/citadel/netconfig.c b/citadel/netconfig.c index b673d389e..d2a39c6c6 100644 --- a/citadel/netconfig.c +++ b/citadel/netconfig.c @@ -443,7 +443,7 @@ void LoadAllNetConfigs(void) (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 diff --git a/webcit/icontheme.c b/webcit/icontheme.c index d8c9984fb..28643aedb 100644 --- a/webcit/icontheme.c +++ b/webcit/icontheme.c @@ -84,7 +84,7 @@ int LoadThemeDir(const char *DirName) (filedir_entry != NULL)) { #ifdef _DIRENT_HAVE_D_NAMELEN - d_namelen = filedir_entry->d_namelen; + d_namelen = filedir_entry->d_namlen; d_type = filedir_entry->d_type; #else diff --git a/webcit/static.c b/webcit/static.c index a1a6251fc..ba4977d35 100644 --- a/webcit/static.c +++ b/webcit/static.c @@ -183,7 +183,7 @@ int LoadStaticDir(const char *DirName, HashList *DirList, const char *RelDir) (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); diff --git a/webcit/subst.c b/webcit/subst.c index 167a94d35..7f9026229 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -1526,8 +1526,7 @@ int LoadTemplateDir(const StrBuf *DirName, HashList *big, const StrBuf *BaseKey) char *MinorPtr; #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