brought CYASSL_CALLBACK code up to current standard

This commit is contained in:
John Safranek
2013-04-08 15:34:54 -07:00
parent 2dd22938d6
commit 9b0ffa0249
6 changed files with 16 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
/* cyassl_callbacks.h
/* callbacks.h
*
* Copyright (C) 2013 wolfSSL Inc.
*
@@ -76,5 +76,5 @@ typedef struct timeoutInfo_st {
#endif
#endif /* CyaSSL_CALLBACKS_H */
#endif /* CYASSL_CALLBACKS_H */

View File

@@ -57,7 +57,7 @@
#endif
#ifdef CYASSL_CALLBACKS
#include <cyassl/openssl/cyassl_callbacks.h>
#include <cyassl/callbacks.h>
#include <signal.h>
#endif

View File

@@ -646,14 +646,14 @@ THREAD_RETURN CYASSL_THREAD client_test(void* args)
int handShakeCB(HandShakeInfo* info)
{
(void)info;
return 0;
}
int timeoutCB(TimeoutInfo* info)
{
(void)info;
return 0;
}

View File

@@ -481,14 +481,14 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
int srvHandShakeCB(HandShakeInfo* info)
{
(void)info;
return 0;
}
int srvTimeoutCB(TimeoutInfo* info)
{
(void)info;
return 0;
}

View File

@@ -60,6 +60,11 @@
#error OPENSSL_EXTRA needs DH, please remove NO_DH
#endif
#if defined(CYASSL_CALLBACKS) && !defined(LARGE_STATIC_BUFFERS)
#error \
CYASSL_CALLBACKS needs LARGE_STATIC_BUFFERS, please add LARGE_STATIC_BUFFERS
#endif
#ifndef NO_CYASSL_CLIENT
static int DoHelloVerifyRequest(CYASSL* ssl, const byte* input, word32*);
@@ -6424,6 +6429,7 @@ int SetCipherList(Suites* s, const char* list)
void FreeTimeoutInfo(TimeoutInfo* info, void* heap)
{
int i;
(void)heap;
for (i = 0; i < MAX_PACKETS_HANDSHAKE; i++)
if (info->packets[i].bufferValue) {
XFREE(info->packets[i].bufferValue, heap, DYNAMIC_TYPE_INFO);

View File

@@ -3500,7 +3500,7 @@ int CyaSSL_set_compression(CYASSL* ssl)
do { \
c.tv_sec = a.tv_sec + b.tv_sec; \
c.tv_usec = a.tv_usec + b.tv_usec; \
if (c.tv_sec >= 1000000) { \
if (c.tv_usec >= 1000000) { \
c.tv_sec++; \
c.tv_usec -= 1000000; \
} \
@@ -3511,7 +3511,7 @@ int CyaSSL_set_compression(CYASSL* ssl)
do { \
c.tv_sec = a.tv_sec - b.tv_sec; \
c.tv_usec = a.tv_usec - b.tv_usec; \
if (c.tv_sec < 0) { \
if (c.tv_usec < 0) { \
c.tv_sec--; \
c.tv_usec += 1000000; \
} \
@@ -3526,6 +3526,7 @@ int CyaSSL_set_compression(CYASSL* ssl)
/* do nothing handler */
static void myHandler(int signo)
{
(void)signo;
return;
}