]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/libjorte/JORTEPublicationWaitForSubscriptions.c
Reformat the sources with orte/uncrustify script
[orte.git] / orte / libjorte / JORTEPublicationWaitForSubscriptions.c
index 601d42b3db05ebacfa04e92e7d06fd90c235e2ea..27b4f033e199c51ccea2107b3117ea5fc3e62b08 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <string.h>
 #include <stdlib.h>
+#include <inttypes.h>
 // library header file's path
 #include "orte.h"
 // getNtpTime function
 
 JNIEXPORT jint JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationWaitForSubscriptions
-(JNIEnv *env, jobject obj, jint j_appDomain_handle,
- jobject obj_ntpT, jlong jretries, jlong jnoSubscriptions)
+  (JNIEnv *env, jobject obj, jlong j_appDomain_handle,
 jobject obj_ntpT, jlong jretries, jlong jnoSubscriptions)
 {
   int            i;
   NtpTime        wait;
 
   #ifdef TEST_STAGE
-    printf(":c: jORTEPublicationWaitForSubscriptions called.. \n");
+  printf(":c: jORTEPublicationWaitForSubscriptions called.. \n");
   #endif
 
   wait = getNtpTime(env, obj_ntpT);
   #ifdef TEST_STAGE
-    printf(":c: check: wait: sec = %d, fract = %d  \n",
-           wait.seconds, wait.fraction);
+  printf(":c: check: wait: sec = %" PRId32 ", fract = %" PRIu32 "  \n",
+        wait.seconds, wait.fraction);
   #endif
 
   // calling original native method
-  i = ORTEPublicationWaitForSubscriptions((ORTEPublication *) j_appDomain_handle,
-                                          wait,
-                                          (unsigned int) jretries,
-                                          (unsigned int) jnoSubscriptions);
-  if (i == ORTE_BAD_HANDLE)
-  {
+  i = ORTEPublicationWaitForSubscriptions((ORTEPublication *)j_appDomain_handle,
+                                         wait,
+                                         (unsigned int)jretries,
+                                         (unsigned int)jnoSubscriptions);
+  if (i == ORTE_BAD_HANDLE) {
     printf(":c!: wait for subscription failed! [bad sub handle] \n");
     return ORTE_BAD_HANDLE;
   }
-  if (i == ORTE_TIMEOUT)
-  {
+  if (i == ORTE_TIMEOUT) {
     printf(":c!: wait for subscriptions - timeout! [number of subscriptions exhausted] \n");
     return ORTE_TIMEOUT;
   }
-  if (i == ORTE_OK);
+  if (i == ORTE_OK) ;
   return ORTE_OK;
 }