Define a BLU_DEBUG so we can NSLog() the buffer in debug mode but not in release
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 27 Feb 2008 22:44:08 +0000 (17:44 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 27 Feb 2008 22:44:08 +0000 (17:44 -0500)
* 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
Source/AppController.m

index 179737845c5bccb23660f3b7031336c0a72f2f5d..6dde7c4ff2b23d37a6367a8d9a4778c835cdf141 100644 (file)
                                INFOPLIST_FILE = Info.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
                                LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/build/Release\"";
+                               OTHER_CFLAGS = "-DBLU_DEBUG";
                                OTHER_LDFLAGS = (
                                        "-undefined",
                                        suppress,
index 6943754186a56ab64aaa8e5975b1484be44e0cc7..4cac97a1d678f1f4c4525a79a3319af9ae363d03 100644 (file)
@@ -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);
 }