]> rtime.felk.cvut.cz Git - orte.git/commitdiff
fixed message lost for case no memory space at sending message queue
authorsmolik <smolik>
Wed, 13 Sep 2006 21:28:11 +0000 (21:28 +0000)
committersmolik <smolik>
Wed, 13 Sep 2006 21:28:11 +0000 (21:28 +0000)
orte/liborte/ORTEPublicationTimer.c

index 4395ca4b4c53b94af8247acdc75b1896ffe7fdc2..0e84516521c60645982ddf5018a491fb7613d95f 100644 (file)
@@ -29,17 +29,19 @@ PublicationCallBackTimer(ORTEDomain *d,void *vcstWriter) {
   ORTESendInfo     info;  
   
   pp=(ORTEPublProp*)cstWriter->objectEntryOID->attributes;
   ORTESendInfo     info;  
   
   pp=(ORTEPublProp*)cstWriter->objectEntryOID->attributes;
-  info.status=NEED_DATA;
-  info.topic=pp->topic;
-  info.type=pp->typeName;
-  info.senderGUID=cstWriter->objectEntryOID->guid;
-  cstWriter->objectEntryOID->sendCallBack(&info,
-                          cstWriter->objectEntryOID->instance,
-                          cstWriter->objectEntryOID->callBackParam);
   CSTWriterTryDestroyBestEffortIssue(cstWriter);
   CSTWriterTryDestroyBestEffortIssue(cstWriter);
+
   if (cstWriter->csChangesCounter<pp->sendQueueSize) {
   if (cstWriter->csChangesCounter<pp->sendQueueSize) {
+    info.status=NEED_DATA;
+    info.topic=pp->topic;
+    info.type=pp->typeName;
+    info.senderGUID=cstWriter->objectEntryOID->guid;
+    cstWriter->objectEntryOID->sendCallBack(&info,
+                          cstWriter->objectEntryOID->instance,
+                          cstWriter->objectEntryOID->callBackParam);
     ORTEPublicationSendLocked(cstWriter,NULL);
   }
     ORTEPublicationSendLocked(cstWriter,NULL);
   }
+
   eventAdd(d,
       cstWriter->objectEntryOID->objectEntryAID,
       &cstWriter->objectEntryOID->sendCallBackDelayTimer,
   eventAdd(d,
       cstWriter->objectEntryOID->objectEntryAID,
       &cstWriter->objectEntryOID->sendCallBackDelayTimer,