File: debian.patch

package info (click to toggle)
aconnectgui 0.9.0rc2-1-11
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 320 kB
  • sloc: cpp: 1,232; makefile: 26
file content (73 lines) | stat: -rw-r--r-- 2,380 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Forwarded: https://github.com/radiganm/aconnectgui/issues/2

--- aconnectgui-0.9.0rc2-1.orig/src/Connection.cxx
+++ aconnectgui-0.9.0rc2-1/src/Connection.cxx
@@ -200,7 +200,6 @@ Connection* Connections::Find(
 
 void Connections::RemoveClient(int id)
 {
-	int nconnections = children();
 			printf("remove_client %d / %d\n",id,children());
 
 	for (int i=0;i<children();)
--- aconnectgui-0.9.0rc2-1.orig/src/Window.cxx
+++ aconnectgui-0.9.0rc2-1/src/Window.cxx
@@ -30,10 +30,10 @@ void Window::Connect(int client,int port
 }		
 
 void Window::Disconnect(
-	int fromClientId,int fromPortId,int toClientId,int toPortId)
+int fromClientId,int fromPortId,int toClientId,int toPortId)
 {
-	Connection* c = mConnections->Find(
-		fromClientId,fromPortId,toClientId,toPortId);
+Connection* c = mConnections->Find(
+        fromClientId,fromPortId,toClientId,toPortId);
 /*
 	if (!c)
 		printf("could not find connection between %d:%d %d:%d\n",
@@ -332,7 +332,11 @@ void Window::Timeout(void)
 			if (ev->type==SND_SEQ_EVENT_CLIENT_EXIT)
 			{
 				Client* c= mClients->FindClient(ev->data.addr.client);
-				int newh = mClients->h()-c->h();
+                                int newh;
+                                if (c)
+                                        newh = mClients->h()-c->h();
+                                else
+                                        newh = mClients->h();
 				mConnections->RemoveClient(ev->data.addr.client);
 				mConnections->size(mConnections->w(),newh);
 				mClients->remove(c);
@@ -348,7 +352,7 @@ void Window::Timeout(void)
 
 Window* patchbay = 0;
 
-main()
+int main()
 {
 	int argc;
 	char* argv[16];
--- aconnectgui-0.9.0rc2-1.orig/src/Window.hxx
+++ aconnectgui-0.9.0rc2-1/src/Window.hxx
@@ -64,7 +64,7 @@ public:
 	
 	Connector* FindOutput(int clientId,int portId)
 	{
-		mClients->FindOutput(clientId,portId);
+		return mClients->FindOutput(clientId,portId);
 	}
 	
 	bool HandleConnect(Connector* a,Connector* b);
--- aconnectgui-0.9.0rc2-1.orig/src/aconnect.cxx
+++ aconnectgui-0.9.0rc2-1/src/aconnect.cxx
@@ -102,7 +102,9 @@ static int check_permission(snd_seq_port
  */
 static void list_each_subs(snd_seq_t *seq, snd_seq_query_subscribe_t *subs, int type, const char *msg)
 {
+#ifndef ACONNECT_GUI
 	int count = 0;
+#endif
 #ifdef ACONNECT_GUI
 	snd_seq_query_subscribe_set_type(subs, (snd_seq_query_subs_type_t) type);
 #else