Make 'port' a string in NET module
- avoids dependency on snprintf
- allows using "smtps" instead of "456" if desired
diff --git a/programs/ssl/dtls_client.c b/programs/ssl/dtls_client.c
index cc0d051..6ac83d7 100644
--- a/programs/ssl/dtls_client.c
+++ b/programs/ssl/dtls_client.c
@@ -61,7 +61,7 @@
#include "mbedtls/certs.h"
#include "mbedtls/timing.h"
-#define SERVER_PORT 4433
+#define SERVER_PORT "4433"
#define SERVER_NAME "localhost"
#define SERVER_ADDR "127.0.0.1" /* forces IPv4 */
#define MESSAGE "Echo this"
@@ -142,8 +142,7 @@
/*
* 1. Start the connection
*/
- mbedtls_printf( " . Connecting to udp/%s/%4d...", SERVER_NAME,
- SERVER_PORT );
+ mbedtls_printf( " . Connecting to udp/%s/%s...", SERVER_NAME, SERVER_PORT );
fflush( stdout );
if( ( ret = mbedtls_net_connect( &server_fd, SERVER_ADDR,