File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161/* Epoch for the multicast session */
6262#define MCAST_EPOCH 1
6363
64+ #if defined(WOLFSSL_DTLS ) && defined(WOLFSSL_MULTICAST )
65+
6466/* Global flag for clean shutdown */
6567static volatile int running = 1 ;
6668
@@ -227,12 +229,6 @@ int main(int argc, char** argv)
227229 wolfSSL_Debugging_ON ();
228230#endif
229231
230- #ifndef WOLFSSL_MULTICAST
231- fprintf (stderr , "Error: wolfSSL not built with multicast support\n" );
232- fprintf (stderr , "Rebuild with: ./configure --enable-dtls --enable-mcast\n" );
233- return 1 ;
234- #else
235-
236232 /* Initialize the pre-shared secrets (same for all peers) */
237233 memset (pms , 0x23 , sizeof (pms ));
238234 memset (clientRandom , 0xA5 , sizeof (clientRandom ));
@@ -450,6 +446,12 @@ int main(int argc, char** argv)
450446 wolfSSL_Cleanup ();
451447
452448 printf ("Node %d: Goodbye!\n" , myId );
453- #endif /* WOLFSSL_MULTICAST */
454449 return 0 ;
455450}
451+ #else
452+ int main ()
453+ {
454+ fprintf (stderr , "Please configure the wolfssl library with --enable-dtls --enable-mcast.\n" );
455+ return 0 ;
456+ }
457+ #endif /* WOLFSSL_DTLS && WOLFSSL_MULTICAST */
You can’t perform that action at this time.
0 commit comments