From 7650bcc4cc0e8e0f3a6e9573b79c238e5ec5094b Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Tue, 19 Jul 2011 16:03:36 -0400 Subject: [PATCH] Fixed problem involving initial port not being set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The way that the Port was originally being managed would not set an init ial port unless the -p command was initialized. This was due to PORT be ing stored as an int rather than a character… and then doing the convers ion based on the input of the -p option. Due to this, the PORT would be non existent if the -p option was not utilized. --- src/OSCeleton.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/OSCeleton.cpp b/src/OSCeleton.cpp index fa5ecb2..f83d10d 100644 --- a/src/OSCeleton.cpp +++ b/src/OSCeleton.cpp @@ -30,7 +30,7 @@ char *ADDRESS = "127.0.0.1"; -int PORT = 7110; +char *PORT = "7110"; #define OUTPUT_BUFFER_SIZE 1024*16 char osc_buffer[OUTPUT_BUFFER_SIZE]; @@ -549,6 +549,7 @@ int main(int argc, char **argv) { usage(argv[0]); } port_argument = arg+1; + PORT = argv[arg+1]; break; case 'w': preview = true; @@ -701,7 +702,7 @@ int main(int argc, char **argv) { xnSetMirror(depth, !mirrorMode); - addr = lo_address_new(ADDRESS, argv[port_argument]); + addr = lo_address_new(ADDRESS, PORT); signal(SIGTERM, terminate); signal(SIGINT, terminate);