From ed15a87b4e413f98d0b7cddce035b09be96ac30c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Voc=C5=AF?= Date: Thu, 22 Mar 2012 12:41:06 +0000 Subject: [PATCH] candidate fix for SB#92708 --- org.glite.lb.logger/src/logd_proto.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/org.glite.lb.logger/src/logd_proto.c b/org.glite.lb.logger/src/logd_proto.c index 8eca13a..f8b80b7 100644 --- a/org.glite.lb.logger/src/logd_proto.c +++ b/org.glite.lb.logger/src/logd_proto.c @@ -556,6 +556,16 @@ int edg_wll_log_proto_server(edg_wll_GssConnection *con, struct timeval *timeout else event->any.priority = 0; } + if (event->any.priority & (EDG_WLL_LOGFLAG_SYNC|EDG_WLL_LOGFLAG_SYNC_COMPAT)) { + if(init_confirmation() < 0) { + glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_WARN,"Error initializing 2nd UNIX socket (%s) for priority messages confirmation.\n",confirm_sock_name); + answer = errno; + goto edg_wll_log_proto_server_end; + } else { + glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Initializing 2nd UNIX socket (%s) for priority messages confirmation...[ok]\n",confirm_sock_name); + } + } + /* if not command, save message to file */ if(strstr(msg, "DG.TYPE=\"command\"") == NULL) { /* compose the name of the log file */ @@ -596,13 +606,6 @@ int edg_wll_log_proto_server(edg_wll_GssConnection *con, struct timeval *timeout if (!send_answer_back(con,answer,timeout)) { answer_sent = 1; } - if(init_confirmation() < 0) { - glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_WARN,"Error initializing 2nd UNIX socket (%s) for priority messages confirmation.\n",confirm_sock_name); - answer = errno; - goto edg_wll_log_proto_server_end; - } else { - glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Initializing 2nd UNIX socket (%s) for priority messages confirmation...[ok]\n",confirm_sock_name); - } } /* send message via IPC (UNIX socket) */ -- 1.8.2.3