From dcc9554da80c5bfcf658e16555e681f78218a672 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 12 May 2013 12:15:15 -0400 Subject: [PATCH] Build Errors - Added missing includes. --- src/TLSClient.cpp | 8 +++++--- src/en-US.h | 1 + src/es-ES.h | 1 + src/fr-FR.h | 1 + src/it-IT.h | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/TLSClient.cpp b/src/TLSClient.cpp index 6227f7600..346489c4e 100644 --- a/src/TLSClient.cpp +++ b/src/TLSClient.cpp @@ -30,12 +30,15 @@ #ifdef HAVE_LIBGNUTLS #include +#include +#include #include #include #include #include #include #include +#include #define MAX_BUF 1024 @@ -102,7 +105,7 @@ void TLSClient::init (const std::string& ca) if (ret == GNUTLS_E_INVALID_REQUEST) std::cout << "c: ERROR Priority error at: " << err << "\n"; - exit (1); + throw std::string (STRING_TLS_INIT_FAIL); } // Apply the x509 credentials to the current session. @@ -113,8 +116,7 @@ void TLSClient::init (const std::string& ca) void TLSClient::connect (const std::string& host, const std::string& port) { // use IPv4 or IPv6, does not matter. - struct addrinfo hints; - memset (&hints, 0, sizeof hints); + struct addrinfo hints = {0}; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; // use my IP diff --git a/src/en-US.h b/src/en-US.h index 699211f1d..3b66a9d5a 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -700,6 +700,7 @@ #define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted." #define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'." #define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field." +#define STRING_TLS_INIT_FAIL "Error initializing TLS." // Feedback #define STRING_FEEDBACK_NO_TASKS "No tasks." diff --git a/src/es-ES.h b/src/es-ES.h index b5390aab6..ad34d29fc 100644 --- a/src/es-ES.h +++ b/src/es-ES.h @@ -715,6 +715,7 @@ #define STRING_UDA_COLLISION "El UDA denominado '{1}' es el mismo que un atributo del núcleo, y no está permitido." #define STRING_INVALID_MOD "El atributo '{1}' no admite un valor '{2}'." #define STRING_INVALID_SORT_COL "La columna '{1}' no es un campo de ordenación válido." +#define STRING_TLS_INIT_FAIL "Error initializing TLS." // Feedback #define STRING_FEEDBACK_NO_TASKS "Ninguna tarea." diff --git a/src/fr-FR.h b/src/fr-FR.h index fe6fbf351..70e736217 100644 --- a/src/fr-FR.h +++ b/src/fr-FR.h @@ -700,6 +700,7 @@ #define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted." #define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'." #define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field." +#define STRING_TLS_INIT_FAIL "Error initializing TLS." // Feedback #define STRING_FEEDBACK_NO_TASKS "No tasks." diff --git a/src/it-IT.h b/src/it-IT.h index fdfac8dda..ba4641a40 100644 --- a/src/it-IT.h +++ b/src/it-IT.h @@ -701,6 +701,7 @@ #define STRING_UDA_COLLISION "L'UDA '{1}' ha lo stesso nome di un attributo di sistema, e ciò non è permesso." #define STRING_INVALID_MOD "L'attributo '{1}' non ammette un valore pari a '{2}'." #define STRING_INVALID_SORT_COL "La colonna '{1}' non è un campo di ordinamento valido." +#define STRING_TLS_INIT_FAIL "Error initializing TLS." // Feedback #define STRING_FEEDBACK_NO_TASKS "Nessun task."