candidate fix for SB#92708
authorMichal Voců <michal@ruk.cuni.cz>
Thu, 22 Mar 2012 12:41:06 +0000 (12:41 +0000)
committerMichal Voců <michal@ruk.cuni.cz>
Thu, 22 Mar 2012 12:41:06 +0000 (12:41 +0000)
org.glite.lb.logger/src/logd_proto.c

index 8eca13a..f8b80b7 100644 (file)
@@ -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) */