debug update, also fixed type mismatches in examples

This commit is contained in:
Joseph Henry
2016-09-08 16:58:52 -07:00
parent efd709dc52
commit 25cf4135c9
3 changed files with 12 additions and 10 deletions

View File

@@ -69,6 +69,7 @@ extern "C" {
#if DEBUG_LEVEL >= MSG_INFO
#if defined(__ANDROID__)
#define DEBUG_INFO(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_INFO : %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
#define DEBUG_BLANK(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_INFO : %s:%d:" fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
#else
#define DEBUG_INFO(fmt, args...) fprintf(stderr, "ZT_INFO : %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args)
#define DEBUG_BLANK(fmt, args...) fprintf(stderr, "ZT_INFO : %s:%d:" fmt "\n", __FILENAME__, __LINE__, ##args)

View File

@@ -130,8 +130,8 @@ class ZTSDK : NSObject
*/
// SOCKET API
func socket(socket_family: Int32, _ socket_type: Int32, _ socket_protocol: Int32) -> Int16 {
return Int16(zt_socket(socket_family, socket_type, socket_protocol));
func socket(socket_family: Int32, _ socket_type: Int32, _ socket_protocol: Int32) -> Int32 {
return zt_socket(socket_family, socket_type, socket_protocol);
}
func connect(fd: Int32, _ addr: ZTAddress) -> Int32 {