mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	introspect: Add version check to pa_context_send_message_to_object()
If an application calls the function when the server doesn't support the feature, the result should be just an error from the function. Without the check the whole connection gets terminated due to protocol error. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
This commit is contained in:
		
							parent
							
								
									6722b2d8c4
								
							
						
					
					
						commit
						5d022a07a6
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -2262,6 +2262,7 @@ pa_operation* pa_context_send_message_to_object(pa_context *c, const char *objec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
 | 
					    PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
 | 
				
			||||||
    PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
 | 
					    PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
 | 
				
			||||||
 | 
					    PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 35, PA_ERR_NOTSUPPORTED);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
 | 
					    o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue