[SCM] jackd2/master: Update no-selfconnect.patch

adiknoth-guest at users.alioth.debian.org adiknoth-guest at users.alioth.debian.org
Wed Apr 18 20:56:11 UTC 2012


The following commit has been merged in the master branch:
commit 3ed36158b958ce54b5e8b59011ef7e94890a8730
Author: Adrian Knoth <adi at drcomp.erfurt.thur.de>
Date:   Wed Apr 18 22:06:18 2012 +0200

    Update no-selfconnect.patch

diff --git a/debian/patches/no-selfconnect.patch b/debian/patches/no-selfconnect.patch
index 5489810..04797b2 100644
--- a/debian/patches/no-selfconnect.patch
+++ b/debian/patches/no-selfconnect.patch
@@ -1,7 +1,7 @@
 From: Adrian Knoth <adi at drcomp.erfurt.thur.de>
 Forwarded: not-needed
 Origin: http://repo.or.cz/w/jack2.git/shortlog/refs/heads/no-self-connect
-Last-Update: 2011-12-05
+Last-Update: 2012-04-18
 Description: Add no-self-connect option to jackd2
  This patch avoids automatic port connections of programs like ardour
  in ladish environments. Depending on the runtime mode, a program cannot
@@ -45,7 +45,7 @@ Description: Add no-self-connect option to jackd2
  };
  
  struct jackctl_driver
-@@ -791,6 +804,40 @@
+@@ -802,6 +815,40 @@
          goto fail_free_parameters;
      }
  
@@ -86,44 +86,44 @@ Description: Add no-self-connect option to jackd2
      JackServerGlobals::on_device_acquire = on_device_acquire;
      JackServerGlobals::on_device_release = on_device_release;
  
-@@ -881,6 +928,7 @@
-             return false;
-         }
+@@ -886,6 +933,8 @@
+     jackctl_server *server_ptr,
+     jackctl_driver *driver_ptr)
+ {
++    JackSelfConnectMode self_connect_mode;
++
+     try {
  
-+	JackSelfConnectMode self_connect_mode;
-         int rc = jack_register_server(server_ptr->name.str, server_ptr->replace_registry.b);
-         switch (rc)
-         {
-@@ -895,6 +943,28 @@
-             goto fail;
+         if (!server_ptr || !driver_ptr) {
+@@ -917,6 +966,27 @@
+             server_ptr->client_timeout.i = 500; /* 0.5 sec; usable when non realtime. */
          }
  
 +        switch (server_ptr->self_connect_mode.c)
 +        {
 +        case SELF_CONNECT_MODE_ALLOW_CHAR:
-+                self_connect_mode = JackSelfConnectAllow;
-+                break;
++            self_connect_mode = JackSelfConnectAllow;
++            break;
 +        case SELF_CONNECT_MODE_FAIL_EXTERNAL_ONLY_CHAR:
-+                self_connect_mode = JackSelfConnectFailExternalOnly;
-+                break;
++            self_connect_mode = JackSelfConnectFailExternalOnly;
++            break;
 +        case SELF_CONNECT_MODE_IGNORE_EXTERNAL_ONLY_CHAR:
-+                self_connect_mode = JackSelfConnectIgnoreExternalOnly;
-+                break;
++            self_connect_mode = JackSelfConnectIgnoreExternalOnly;
++            break;
 +        case SELF_CONNECT_MODE_FAIL_ALL_CHAR:
-+                self_connect_mode = JackSelfConnectFailAll;
-+                break;
++            self_connect_mode = JackSelfConnectFailAll;
++            break;
 +        case SELF_CONNECT_MODE_IGNORE_ALL_CHAR:
-+                self_connect_mode = JackSelfConnectIgnoreAll;
-+                break;
++            self_connect_mode = JackSelfConnectIgnoreAll;
++            break;
 +        default:
-+                self_connect_mode = JACK_DEFAULT_SELF_CONNECT_MODE;
++            self_connect_mode = JACK_DEFAULT_SELF_CONNECT_MODE;
 +        }
 +
-+
-         jack_log("server `%s' registered", server_ptr->name.str);
- 
-         /* clean up shared memory and files from any previous
-@@ -922,6 +992,7 @@
+         /* check port max value before allocating server */
+         if (server_ptr->port_max.ui > PORT_NUM_MAX) {
+             jack_error("Jack server started with too much ports %d (when port max can be %d)", server_ptr->port_max.ui, PORT_NUM_MAX);
+@@ -933,6 +1003,7 @@
              server_ptr->port_max.ui,
              server_ptr->verbose.b,
              (jack_timer_type_t)server_ptr->clock_source.ui,
@@ -133,22 +133,24 @@ Description: Add no-self-connect option to jackd2
          {
 --- a/common/JackEngine.cpp
 +++ b/common/JackEngine.cpp
-@@ -38,11 +38,13 @@
+@@ -38,13 +38,15 @@
  
  JackEngine::JackEngine(JackGraphManager* manager,
                         JackSynchro* table,
--                       JackEngineControl* control)
+-                       JackEngineControl* control) 
 +                       JackEngineControl* control,
 +                       JackSelfConnectMode self_connect_mode)
+                     : JackLockAble(control->fServerName), 
+                     fSignal(control->fServerName)
  {
      fGraphManager = manager;
      fSynchroTable = table;
      fEngineControl = control;
 +    fSelfConnectMode = self_connect_mode;
-     for (int i = 0; i < CLIENT_NUM; i++)
+     for (int i = 0; i < CLIENT_NUM; i++) {
          fClientTable[i] = NULL;
-     fLastSwitchUsecs = 0;
-@@ -758,10 +760,10 @@
+     }
+@@ -800,10 +802,10 @@
  
      // First disconnect all ports
      for (int i = 0; (i < PORT_NUM_FOR_CLIENT) && (input_ports[i] != EMPTY); i++) {
@@ -161,7 +163,7 @@ Description: Add no-self-connect option to jackd2
      }
  
      // Then issue port registration notification
-@@ -816,7 +818,7 @@
+@@ -859,7 +861,7 @@
      JackClientInterface* client = fClientTable[refnum];
  
      // Disconnect port ==> notification is sent
@@ -169,8 +171,8 @@ Description: Add no-self-connect option to jackd2
 +    PortDisconnect(-1, port_index, ALL_PORTS);
  
      if (fGraphManager->ReleasePort(refnum, port_index) == 0) {
-         if (client->GetClientControl()->fActive)
-@@ -827,6 +829,72 @@
+         if (client->GetClientControl()->fActive) {
+@@ -871,6 +873,72 @@
      }
  }
  
@@ -243,7 +245,7 @@ Description: Add no-self-connect option to jackd2
  int JackEngine::PortConnect(int refnum, const char* src, const char* dst)
  {
      jack_log("JackEngine::PortConnect src = %s dst = %s", src, dst);
-@@ -866,7 +934,12 @@
+@@ -911,7 +979,12 @@
          return -1;
      }
  
@@ -254,10 +256,10 @@ Description: Add no-self-connect option to jackd2
 +    }
 +
 +    res = fGraphManager->Connect(src, dst);
-     if (res == 0)
+     if (res == 0) {
          NotifyPortConnect(src, dst, true);
-     return res;
-@@ -908,15 +981,21 @@
+     }
+@@ -954,15 +1027,21 @@
          }
  
          return ret;
@@ -288,7 +290,7 @@ Description: Add no-self-connect option to jackd2
  int JackEngine::PortRename(int refnum, jack_port_id_t port, const char* name)
 --- a/common/JackEngine.h
 +++ b/common/JackEngine.h
-@@ -47,6 +47,7 @@
+@@ -49,6 +49,7 @@
  
          JackGraphManager* fGraphManager;
          JackEngineControl* fEngineControl;
@@ -296,7 +298,7 @@ Description: Add no-self-connect option to jackd2
          JackClientInterface* fClientTable[CLIENT_NUM];
          JackSynchro* fSynchroTable;
          JackServerNotifyChannel fChannel;              /*! To communicate between the RT thread and server */
-@@ -90,9 +91,11 @@
+@@ -94,9 +95,11 @@
              return (refnum >= 0 && refnum < CLIENT_NUM && fClientTable[refnum] != NULL);
          }
  
@@ -344,7 +346,7 @@ Description: Add no-self-connect option to jackd2
      // regular freewheel driver because the freewheel driver needs to run in
 --- a/common/JackServer.h
 +++ b/common/JackServer.h
-@@ -63,7 +63,7 @@
+@@ -64,7 +64,7 @@
  
      public:
  
@@ -409,7 +411,7 @@ Description: Add no-self-connect option to jackd2
  #endif
 --- a/common/Jackdmp.cpp
 +++ b/common/Jackdmp.cpp
-@@ -193,8 +193,8 @@
+@@ -184,8 +184,8 @@
      jackctl_driver_t * master_driver_ctl;
      jackctl_driver_t * loopback_driver_ctl = NULL;
      int replace_registry = 0;
@@ -419,7 +421,7 @@ Description: Add no-self-connect option to jackd2
  #ifdef __linux__
          "c:"
  #endif
-@@ -224,6 +224,7 @@
+@@ -215,6 +215,7 @@
                                         { "version", 0, 0, 'V' },
                                         { "silent", 0, 0, 's' },
                                         { "sync", 0, 0, 'S' },
@@ -427,7 +429,7 @@ Description: Add no-self-connect option to jackd2
                                         { 0, 0, 0, 0 }
                                     };
  
-@@ -288,6 +289,26 @@
+@@ -279,6 +280,26 @@
                  break;
          #endif
  

-- 
jackd2 packaging



More information about the pkg-multimedia-commits mailing list