mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	res_stasis_recording.c: Save recording state when unmuted.
Fixes #322
(cherry picked from commit 8be6f7b78c)
			
			
This commit is contained in:
		
				
					committed by
					
						 Asterisk Development Team
						Asterisk Development Team
					
				
			
			
				
	
			
			
			
						parent
						
							23b00a5cec
						
					
				
				
					commit
					3140af85a6
				
			| @@ -547,27 +547,27 @@ static int recording_unpause(struct stasis_app_recording *recording) | ||||
| 		AST_CONTROL_RECORD_SUSPEND); | ||||
| } | ||||
|  | ||||
| static int recording_mute(struct stasis_app_recording *recording) | ||||
| static int toggle_recording_mute(struct stasis_app_recording *recording, int desired_mute_state) | ||||
| { | ||||
| 	if (recording->muted) { | ||||
| 		/* already muted */ | ||||
| 	if (recording->muted == desired_mute_state) { | ||||
| 		/* already in desired state */ | ||||
| 		return 0; | ||||
| 	} | ||||
|  | ||||
| 	recording->muted = 1; | ||||
| 	recording->muted = desired_mute_state; | ||||
|  | ||||
| 	return stasis_app_control_queue_control(recording->control, | ||||
| 		AST_CONTROL_RECORD_MUTE); | ||||
| } | ||||
|  | ||||
| static int recording_mute(struct stasis_app_recording *recording) | ||||
| { | ||||
| 	return toggle_recording_mute(recording, 1); | ||||
| } | ||||
|  | ||||
| static int recording_unmute(struct stasis_app_recording *recording) | ||||
| { | ||||
| 	if (!recording->muted) { | ||||
| 		/* already unmuted */ | ||||
| 		return 0; | ||||
| 	} | ||||
|  | ||||
| 	return stasis_app_control_queue_control(recording->control, | ||||
| 		AST_CONTROL_RECORD_MUTE); | ||||
| 	return toggle_recording_mute(recording, 0); | ||||
| } | ||||
|  | ||||
| recording_operation_cb operations[STASIS_APP_RECORDING_STATE_MAX][STASIS_APP_RECORDING_OPER_MAX] = { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user