handle DG.PRIORITY correctly
authorMichal Voců <michal@ruk.cuni.cz>
Wed, 18 Jun 2008 19:39:27 +0000 (19:39 +0000)
committerMichal Voců <michal@ruk.cuni.cz>
Wed, 18 Jun 2008 19:39:27 +0000 (19:39 +0000)
org.glite.lb.logger/src/server_msg.c

index 1eff856..5323ec6 100644 (file)
@@ -16,7 +16,7 @@ create_msg(il_octet_string_t *ev, char **buffer, long *receipt, time_t *expires)
   char *p;  int  len;
   char *event = ev->data;
 
-  *receipt = 0;
+  *receipt = 0L;
 
 #if defined(INTERLOGD_EMS)
   /* find DG.LLLID */
@@ -41,18 +41,19 @@ create_msg(il_octet_string_t *ev, char **buffer, long *receipt, time_t *expires)
       int n;
       
       p += 12; /* skip the key and = */
-      if((n = atoi(p)) == 0) {
+      n = atoi(p);
+      if((n & EDG_WLL_LOGFLAG_SYNC) == 0) {
        /* normal asynchronous message */
-       *receipt = 0;
+             *receipt = 0L;
       }
     } else {
       /* could not find priority key */
-      *receipt = 0;
+      *receipt = 0L;
     }
     
   } else {
     /* could not find local logger PID, confirmation can not be sent */
-    *receipt = 0;
+    *receipt = 0L;
   }
 #endif