From 7d7dde7e61fe386555e5d7bab653dd47ead95d70 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 27 Feb 2008 17:44:08 -0500 Subject: [PATCH] Define a BLU_DEBUG so we can NSLog() the buffer in debug mode but not in release * PrintDrop.xcodeproj: Define BLU_DEBUG for the PrintDrop-Debug target * Source/AppController.m: ([AppController readChannel:]): If BLU_DEBUG is defined, NSLog() the buffer --- PrintDrop.xcodeproj/project.pbxproj | 1 + Source/AppController.m | 3 +++ 2 files changed, 4 insertions(+) diff --git a/PrintDrop.xcodeproj/project.pbxproj b/PrintDrop.xcodeproj/project.pbxproj index 1797378..6dde7c4 100644 --- a/PrintDrop.xcodeproj/project.pbxproj +++ b/PrintDrop.xcodeproj/project.pbxproj @@ -476,6 +476,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/build/Release\""; + OTHER_CFLAGS = "-DBLU_DEBUG"; OTHER_LDFLAGS = ( "-undefined", suppress, diff --git a/Source/AppController.m b/Source/AppController.m index 6943754..4cac97a 100644 --- a/Source/AppController.m +++ b/Source/AppController.m @@ -77,6 +77,9 @@ memset(&buf, '\0', sizeof(buf)); sleep(1); numbytes = libssh2_channel_read(channel, buf, sizeof(buf)); +#ifdef BLU_DEBUG + NSLog(@"buf: %s", buf); +#endif } while (numbytes > 0); } -- 2.43.5