Browse Source

manually merge --load-session patch by Rik Berkelder

tags/v1.4.0
Nils 4 years ago
parent
commit
0919aff9ab
3 changed files with 19 additions and 3 deletions
  1. +2
    -1
      AUTHORS
  2. +1
    -0
      CHANGELOG
  3. +16
    -2
      src/nsmd.cpp

+ 2
- 1
AUTHORS View File

@@ -10,4 +10,5 @@ Runge, David / dvzrv (new-session-manager fork)
# Individual Contributions in alphabetical surname order

Meyer, Hermann / brummer
Picot, Mathieu / houston
Picot, Mathieu / houston
Berkelder, Rik

+ 1
- 0
CHANGELOG View File

@@ -1,4 +1,5 @@
v1.4
nsmd command line option --load-session to directly load one (Berkelder, Rik)
Better detection of clients that failed to launch leads to faster session startup (by 5 seconds)
Users get informed by label if an executable is not present on the system or permission denied
Fixed reply for listing sessions from a plain "Done." to proper reply path with empty string as terminal symbol "/reply", "/nsm/server/list", ""


+ 16
- 2
src/nsmd.cpp View File

@@ -2305,9 +2305,10 @@ int main(int argc, char *argv[])
srand( (unsigned int) seconds );
}

// char *osc_port = "6666";
//Command line parameters
char *osc_port = NULL;
const char *gui_url = NULL;
const char *load_session = NULL;

static struct option long_options[] =
{
@@ -2316,6 +2317,7 @@ int main(int argc, char *argv[])
{ "osc-port", required_argument, 0, 'p' },
{ "gui-url", required_argument, 0, 'g' },
{ "help", no_argument, 0, 'h' },
{ "load-session", required_argument, 0, 'l'},
{ 0, 0, 0, 0 }
};

@@ -2349,8 +2351,12 @@ int main(int argc, char *argv[])
DMESSAGE( "Going to connect to GUI at: %s", optarg );
gui_url = optarg;
break;
case 'l':
DMESSAGE( "Loading existing session file %s", optarg);
load_session = optarg;
break;
case 'h':
printf( "Usage: %s [--osc-port portnum] [--session-root path]\n\n", argv[0] );
printf( "Usage: %s [--osc-port portnum] [--session-root path] [--load-session session-name]\n\n", argv[0] );
exit(0);
break;
}
@@ -2425,6 +2431,14 @@ int main(int argc, char *argv[])

osc_server->add_method( NULL, NULL, OSC_NAME( null ),NULL, "" );

if ( load_session )
{
char *spath;
asprintf( &spath, "%s/%s", session_root, load_session); // Build the session path. --load-session works with --session-root
MESSAGE( "LOAD SESSION %s", spath);
load_session_file( spath );
}

if ( detach )
{
MESSAGE( "Detaching from console" );


Loading…
Cancel
Save