|  | @@ -354,24 +354,24 @@ int JackEngine::ClientExternalNew(const char* name, int* ref, int* shared_engine | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (!fSynchroTable[refnum]->Allocate(name, 0)) { |  |  | if (!fSynchroTable[refnum]->Allocate(name, 0)) { | 
														
													
														
															
																|  |  | jack_error("Cannot allocate synchro"); |  |  |  | 
														
													
														
															
																|  |  | goto error; |  |  |  | 
														
													
														
															
																|  |  |  |  |  | jack_error("Cannot allocate synchro"); | 
														
													
														
															
																|  |  |  |  |  | goto error1; | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (client->Open(name, refnum, shared_client) < 0) { |  |  | if (client->Open(name, refnum, shared_client) < 0) { | 
														
													
														
															
																|  |  | jack_error("Cannot open client"); |  |  | jack_error("Cannot open client"); | 
														
													
														
															
																|  |  | goto error; |  |  |  | 
														
													
														
															
																|  |  |  |  |  | goto error1; | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (!fSignal->TimedWait(5 * 1000000)) { |  |  | if (!fSignal->TimedWait(5 * 1000000)) { | 
														
													
														
															
																|  |  | // Failure if RT thread is not running (problem with the driver...) |  |  | // Failure if RT thread is not running (problem with the driver...) | 
														
													
														
															
																|  |  | jack_error("Driver is not running"); |  |  | jack_error("Driver is not running"); | 
														
													
														
															
																|  |  | goto error; |  |  |  | 
														
													
														
															
																|  |  |  |  |  | goto error2; | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (NotifyAddClient(client, name, refnum) < 0) { |  |  | if (NotifyAddClient(client, name, refnum) < 0) { | 
														
													
														
															
																|  |  | jack_error("Cannot notify add client"); |  |  | jack_error("Cannot notify add client"); | 
														
													
														
															
																|  |  | goto error; |  |  |  | 
														
													
														
															
																|  |  |  |  |  | goto error2; | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | fClientTable[refnum] = client; |  |  | fClientTable[refnum] = client; | 
														
													
												
													
														
															
																|  | @@ -379,10 +379,13 @@ int JackEngine::ClientExternalNew(const char* name, int* ref, int* shared_engine | 
														
													
														
															
																|  |  | *shared_engine = fEngineControl->GetShmIndex(); |  |  | *shared_engine = fEngineControl->GetShmIndex(); | 
														
													
														
															
																|  |  | *shared_graph_manager = fGraphManager->GetShmIndex(); |  |  | *shared_graph_manager = fGraphManager->GetShmIndex(); | 
														
													
														
															
																|  |  | *ref = refnum; |  |  | *ref = refnum; | 
														
													
														
															
																|  |  | return 0; |  |  |  | 
														
													
														
															
																|  |  |  |  |  | return 0; | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  |  |  |  | error1: | 
														
													
														
															
																|  |  |  |  |  | fGraphManager->ReleaseRefNum(refnum); | 
														
													
														
															
																|  |  |  |  |  | return -1; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | error: |  |  |  | 
														
													
														
															
																|  |  | fGraphManager->ReleaseRefNum(refnum); |  |  |  | 
														
													
														
															
																|  |  |  |  |  | error2: | 
														
													
														
															
																|  |  | ClientCloseAux(refnum, client, false); |  |  | ClientCloseAux(refnum, client, false); | 
														
													
														
															
																|  |  | client->Close(); |  |  | client->Close(); | 
														
													
														
															
																|  |  | return -1; |  |  | return -1; | 
														
													
												
													
														
															
																|  | 
 |