]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/examples/reliable/r_subscriber_reliable.c
updated email address - petr@smoliku.cz
[orte.git] / orte / examples / reliable / r_subscriber_reliable.c
index e3d4f6418780640d294999558bfe174f23f16f6c..844415d9f1a35f784ee8e77f2322ea10e972a66a 100644 (file)
@@ -2,9 +2,19 @@
  *  $Id: subscriberreliable.c,v 0.0.0.1 2003/12/27 
  *
  *  DEBUG:  section                     subscriber reliable
- *  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              instance2Recv[64];
+#ifdef MAIN_RENAMED
+#define main orte_r_subscriber_reliable_main
+#define exit return
+#endif
+
+static ORTEDomain        *d;
+static char              instance2Recv[64];
 
-void
+static void
 recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam) {
   char *instance=(char*)vinstance;
   
@@ -66,6 +81,10 @@ main(int argc, char *args[]) {
        recvCallBack,
        NULL,
        IPADDRESS_INVALID);
+  if (s == NULL) {
+    printf("ORTESubscriptionCreate failed\n");
+    return 1;
+  }
   #ifndef CONFIG_ORTE_RT
   while (1) 
     ORTESleepMs(1000);