Re: [LAU] Editing zynadsuxfx/yoshimi patches?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Audio User <linux-audio-user@...>
Date: Tuesday, May 3, 2011 - 8:08 pm

On Tue, May 03, 2011 at 04:38:48AM +1000, cal wrote:

Yes that is a problem. I wrote a simple patch for oscsend
that starts a server, and prints out the reply it gets.
I've tested this with ardour and dssi plugins, and they don't
seem to respond to any of the possible queries like #type-signature
or #documentation. It would be nice to have at least one program
patched, (or make a program that does nothing, but responds to
everything descently), so we have a test case...

greetings,

lieven

P.S. This patch does not filter messages yet, because I first
wanted to see what applications are responding to.
It seems that the applications I tested don't even reply
#error messages, when a query cannot be replied to.
So that's probably all up to de developers...

diff --git a/src/tools/oscsend.c b/src/tools/oscsend.c
index 61ee1ee..66f3a5c 100644
--- a/src/tools/oscsend.c
+++ b/src/tools/oscsend.c
@@ -231,6 +231,26 @@ lo_message create_message(char **argv)
return NULL;
}

+void error_handler(int num, const char *msg, const char *where)
+{
+ fprintf(stderr, "errno:%i\nmsg:%s\nwhere:%s\n", num, msg, where);
+}
+
+int query_print_reply(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
+{
+ fprintf(stdout, "path: %s\n", path);
+ fprintf(stdout, "types: %s\n", types);
+ fprintf(stdout, "argv[0]: ");
+ lo_arg_pp(types[0], argv[0]);
+ fprintf(stdout, "\n");
+ fprintf(stdout, "argv[1]-argv[argc]: ");
+ unsigned int i;
+ for(i = 1; i < argc; i++){
+ lo_arg_pp(types[i], argv[i]);
+ }
+ fprintf(stdout, "\n");
+}
+
int main(int argc, char **argv)
{
lo_address target;
@@ -251,14 +271,21 @@ int main(int argc, char **argv)
exit(1);
}

- target = lo_address_new(argv[1], argv[2]);
- if (target == NULL) {
- fprintf(stderr, "Failed to open %s:%s\n", argv[1], argv[2]);
+ if (argv[3] == NULL) {
+ fprintf(stderr, "No path is given.\n");
exit(1);
}

- if (argv[3] == NULL) {
- fprintf(stderr, "No path is given.\n");
+ lo_server_thread server_thread = lo_server_thread_new(NULL, error_handler);
+ lo_method method = lo_server_thread_add_method(server_thread, NULL, NULL, query_print_reply, NULL);
+ lo_server server = lo_server_thread_get_server(server_thread);
+
+ if(lo_server_thread_start(server_thread) != 0)
+ fprintf(stderr, "Could not start server thread.");
+
+ target = lo_address_new(argv[1], argv[2]);
+ if (target == NULL) {
+ fprintf(stderr, "Failed to open %s:%s\n", argv[1], argv[2]);
exit(1);
}

@@ -277,5 +304,9 @@ int main(int argc, char **argv)
exit(1);
}

+ if(lo_server_wait(server, 20)){
+ lo_server_recv(server);
+ }
+
return 0;
}

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Fri Apr 15, 10:50 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, M Watts, (Sat Apr 16, 10:52 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Joel Roth, (Sat Apr 16, 2:16 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Sat Apr 16, 11:17 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Sat Apr 16, 8:57 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Sat Apr 16, 7:18 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Sun Apr 17, 3:44 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Sun Apr 17, 4:32 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Mon Apr 18, 12:02 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Tue Apr 19, 7:57 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue Apr 19, 12:16 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue Apr 19, 4:05 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Tue Apr 19, 8:03 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue Apr 19, 8:10 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Tue Apr 19, 10:07 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue Apr 19, 10:34 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Tue Apr 19, 11:35 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed Apr 20, 8:49 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Wed Apr 20, 12:24 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Wed Apr 20, 1:01 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed Apr 20, 8:54 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Wed Apr 20, 7:27 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed Apr 20, 8:42 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Thu Apr 21, 2:19 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 9:26 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 29, 5:41 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 29, 11:04 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Tue May 3, 8:34 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue May 3, 8:43 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Mon May 2, 1:38 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Mon May 2, 2:54 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu May 5, 11:36 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Fri May 6, 11:19 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri May 6, 11:45 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri May 6, 9:49 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri May 6, 10:56 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Fri Apr 29, 5:55 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 29, 5:59 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 29, 7:27 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Fri Apr 29, 7:53 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 29, 8:28 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Fri Apr 29, 8:38 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 29, 9:33 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Mon May 2, 1:55 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Mon May 2, 2:45 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Tue May 3, 8:08 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue May 3, 8:23 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue May 3, 8:51 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Wed May 4, 12:18 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed May 4, 9:02 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Wed May 4, 1:52 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed May 4, 3:39 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Sun May 8, 4:05 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Wed May 4, 2:00 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Wed May 4, 1:38 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Wed May 4, 1:54 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Wed May 4, 6:18 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed May 4, 6:29 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Wed May 4, 2:50 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Thu May 5, 1:53 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Thu May 5, 2:00 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Tue May 3, 9:09 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 7:23 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Thu Apr 21, 12:05 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 8:40 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Thu Apr 21, 10:18 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 11:03 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 11:00 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, david, (Thu Apr 21, 8:19 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 9:28 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Arnold Krille, (Thu Apr 21, 11:04 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Thu Apr 21, 10:29 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Arnold Krille, (Thu Apr 21, 11:09 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 10:58 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Wed Apr 27, 8:40 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed Apr 27, 9:08 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Thu Apr 28, 3:36 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 28, 5:23 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Thu Apr 28, 8:14 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Fri Apr 29, 7:48 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 29, 10:52 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Folderol, (Thu Apr 28, 8:56 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Thu Apr 28, 8:03 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, david, (Thu Apr 28, 8:14 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Thu Apr 28, 2:53 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 28, 8:14 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Fri Apr 22, 2:34 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Cedric Roux, (Fri Apr 22, 7:22 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Fri Apr 22, 8:13 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Fri Apr 22, 2:26 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Paul Davis, (Fri Apr 22, 1:24 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Fri Apr 22, 10:44 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Sat Apr 23, 7:43 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Sat Apr 23, 12:21 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Sat Apr 23, 7:12 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, david, (Thu Apr 21, 7:06 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 7:14 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Folderol, (Thu Apr 21, 7:32 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Thu Apr 21, 10:36 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Thu Apr 21, 7:57 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, david, (Fri Apr 22, 6:29 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Lieven Moors, (Thu Apr 21, 1:41 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Folderol, (Thu Apr 21, 8:31 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Wed Apr 20, 7:39 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Folderol, (Tue Apr 19, 8:25 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, linuxdsp, (Mon Apr 18, 12:28 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Mon Apr 18, 5:36 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Mon Apr 18, 6:13 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Folderol, (Mon Apr 18, 7:12 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Mon Apr 18, 9:26 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, david, (Tue Apr 19, 8:44 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Tue Apr 19, 7:51 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, david, (Tue Apr 19, 8:05 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Tue Apr 19, 10:01 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Mon Apr 18, 9:06 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Mon Apr 18, 1:55 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S C Rigler, (Mon Apr 18, 2:07 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Jostein Chr. Andersen, (Sat Apr 16, 11:20 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Julien Claassen, (Sat Apr 16, 11:27 am)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, S. Massy, (Sat Apr 16, 7:28 pm)
Re: [LAU] Editing zynadsuxfx/yoshimi patches?, Jostein Chr. Andersen, (Sun Apr 17, 11:06 am)