]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/examples/reliable/r_publisher.c
updated email address - petr@smoliku.cz
[orte.git] / orte / examples / reliable / r_publisher.c
index 67690dacf4cd4a83c20c2b8e0b74c8a8a060ff73..2e2139c6d631d3d822c168430c1dcbb64ac1d499 100644 (file)
@@ -2,9 +2,19 @@
  *  $Id: publisher.c,v 0.0.0.1          2003/12/27 
  *
  *  DEBUG:  section                     publisher
- *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
  *
- *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
+ *  -------------------------------------------------------------------  
+ *                                ORTE                                 
+ *                      Open Real-Time Ethernet                       
+ *                                                                    
+ *                      Copyright (C) 2001-2006                       
+ *  Department of Control Engineering FEE CTU Prague, Czech Republic  
+ *                      http://dce.felk.cvut.cz                       
+ *                      http://www.ocera.org                          
+ *                                                                    
+ *  Author:             Petr Smolik    petr@smoliku.cz             
+ *  Advisor:            Pavel Pisa                                   
+ *  Project Responsible: Zdenek Hanzalek                              
  *  --------------------------------------------------------------------
  *
  *  This program is free software; you can redistribute it and/or modify
 #endif
 #include "orte.h"
 
-ORTEDomain        *d;
-char              instance2Send[64];
-int               counter=0;
+#ifdef MAIN_RENAMED
+#define main orte_r_publisher_main
+#define exit return
+#endif
+
+static ORTEDomain        *d;
+static char              instance2Send[64];
+static int               counter=0;
 
-void
+static void
 sendCallBack(const ORTESendInfo *info,void *vinstance, void *sendCallBackParam) {
   char *instance=(char*)vinstance;
 
@@ -64,6 +79,10 @@ main(int argc, char *args[]) {
       sendCallBack,
       NULL,
       &repeating);
+  if (p == NULL) {
+    printf("ORTEPublicationCreate failed\n");
+    return 1;
+  }
   #ifndef CONFIG_ORTE_RT
   while(1) {
     ORTESleepMs(1000);