commit 602b8f68310aad6c29c70553e8167c864c320c7c
parent 38b76c8b24375ad4696c47b524d201d4726478ff
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Sat, 10 Aug 2013 15:02:08 -0400
Fix Oscprompt interactions
Diffstat:
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -26,7 +26,7 @@ pkg_search_module(LASH lash-1.0)
mark_as_advanced(LASH_LIBRARIES)
pkg_search_module(DSSI dssi>=0.9.0)
mark_as_advanced(DSSI_LIBRARIES)
-pkg_search_module(LIBLO liblo>=0.26)
+pkg_search_module(LIBLO liblo>=0.26 REQUIRED)
mark_as_advanced(LIBLO_LIBRARIES)
######### Settings ###########
diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp
@@ -68,15 +68,26 @@ void path_search(const char *m)
for(const Port &p:*ports) {
if(strstr(p.name, needle)!=p.name)
continue;
- types[pos] = types[pos+1] = 's';
+ printf("Reporting '%s'\n", p.name);
+ types[pos] = 's';
args[pos++].s = p.name;
- args[pos++].s = p.metadata;
+ types[pos] = 'b';
+ if(p.metadata && *p.metadata) {
+ args[pos].b.data = (unsigned char*) p.metadata;
+ auto tmp = rtosc::Port::MetaContainer(p.metadata);
+ args[pos++].b.len = tmp.length();
+ } else {
+ args[pos].b.data = (unsigned char*) NULL;
+ args[pos++].b.len = 0;
+ }
}
}
+
//Reply to requester
- char buffer[1024];
- size_t length = rtosc_amessage(buffer, 1024, "/paths", types, args);
+ char buffer[1024*4];
+ size_t length = rtosc_amessage(buffer, sizeof(buffer), "/paths", types, args);
+ printf("ARG COUNT = %d\n", rtosc_narguments(buffer));
if(length) {
lo_message msg = lo_message_deserialise((void*)buffer, length, NULL);
lo_address addr = lo_address_new_from_url(last_url.c_str());