remove logging statics if not in debug mode, minor warning fixes

This commit is contained in:
Todd A Ouska
2011-07-13 12:25:08 -07:00
parent 2b01ccd57d
commit 9cd322ba91
6 changed files with 29 additions and 8 deletions

View File

@@ -29,13 +29,18 @@
CYASSL_API int CyaSSL_Debugging_ON(void);
CYASSL_API void CyaSSL_Debugging_OFF(void);
#ifdef DEBUG_CYASSL
/* Set these to default values initially. */
static CyaSSL_Logging_cb log_function = 0;
static int loggingEnabled = 0;
#endif /* DEBUG_CYASSL */
int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb f)
{
#ifdef DEBUG_CYASSL
int res = 0;
if (f)
@@ -44,6 +49,10 @@ int CyaSSL_SetLoggingCb(CyaSSL_Logging_cb f)
res = BAD_FUNC_ARG;
return res;
#else
(void)f;
return NOT_COMPILED_IN;
#endif
}
@@ -60,7 +69,9 @@ int CyaSSL_Debugging_ON(void)
void CyaSSL_Debugging_OFF(void)
{
#ifdef DEBUG_CYASSL
loggingEnabled = 0;
#endif
}