From 1c6add6c2b9b51dc7a7a2f4867b2fa29e9f9699b Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 2 May 2013 22:18:44 -0700 Subject: [PATCH] NSM/jackpatch: Rebuild patch network upon NSM save. --- session-manager/src/jackpatch.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/session-manager/src/jackpatch.c b/session-manager/src/jackpatch.c index a0614c8..aa0b03c 100644 --- a/session-manager/src/jackpatch.c +++ b/session-manager/src/jackpatch.c @@ -490,6 +490,8 @@ snapshot ( const char *file ) return; } + clear_all_patches(); + for ( port = ports; *port; port++ ) { jack_port_t *p; @@ -506,7 +508,11 @@ snapshot ( const char *file ) for ( connection = connections; *connection; connection++ ) { - fprintf( fp, "%-40s |> %s\n", *port, *connection ); + char *s; + asprintf( &s, "%-40s |> %s\n", *port, *connection ); + fprintf( fp, "%s", s ); + process_patch( s ); + free(s); printf( "++ %s |> %s\n", *port, *connection ); }