From 80364008c21a50fbb0788c63e76561f275bd3c23 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 24 Dec 2004 07:50:10 +0000 Subject: [PATCH] Support path/<action>.<host>.[service] semaphore files in addition to path/<action>.<host.domain>.[service] semaphore files in semfile_list_init(). --- src/sbbs3/semfile.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/semfile.c b/src/sbbs3/semfile.c index 07f065273f..4396e7d5bb 100644 --- a/src/sbbs3/semfile.c +++ b/src/sbbs3/semfile.c @@ -76,8 +76,9 @@ char* DLLCALL semfile_list_check(time_t* t, link_list_t* filelist) void DLLCALL semfile_list_init(link_list_t* filelist, const char* parent, const char* action, const char* service) { - char path[MAX_PATH+1]; - char hostname[128]; + char path[MAX_PATH+1]; + char hostname[128]; + char* p; listInit(filelist,0); SAFEPRINTF2(path,"%s%s",parent,action); @@ -89,6 +90,13 @@ void DLLCALL semfile_list_init(link_list_t* filelist, const char* parent, listPushNodeString(filelist,path); SAFEPRINTF4(path,"%s%s.%s.%s",parent,action,hostname,service); listPushNodeString(filelist,path); + if((p=strchr(hostname,'.'))!=NULL) { + *p=0; + SAFEPRINTF3(path,"%s%s.%s",parent,action,hostname); + listPushNodeString(filelist,path); + SAFEPRINTF4(path,"%s%s.%s.%s",parent,action,hostname,service); + listPushNodeString(filelist,path); + } } } -- GitLab