mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Remove const qualifier for device
The internal API in bluetooth-util should not use the const qualifier for operations involving a device object. After all, the structure contains many pointers and thus the const qualifier provides no real protection.
This commit is contained in:
		
							parent
							
								
									3bb0b88beb
								
							
						
					
					
						commit
						24c1892a1f
					
				
					 3 changed files with 11 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -919,7 +919,7 @@ fail:
 | 
			
		|||
    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *y, const char* address) {
 | 
			
		||||
pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *y, const char* address) {
 | 
			
		||||
    pa_bluetooth_device *d;
 | 
			
		||||
    void *state = NULL;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -937,7 +937,7 @@ const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_di
 | 
			
		|||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *y, const char* path) {
 | 
			
		||||
pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *y, const char* path) {
 | 
			
		||||
    pa_bluetooth_device *d;
 | 
			
		||||
 | 
			
		||||
    pa_assert(y);
 | 
			
		||||
| 
						 | 
				
			
			@ -970,7 +970,7 @@ pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discov
 | 
			
		|||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetooth_device *d, enum profile profile) {
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(pa_bluetooth_device *d, enum profile profile) {
 | 
			
		||||
    pa_bluetooth_transport *t;
 | 
			
		||||
    void *state = NULL;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -130,11 +130,11 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *d);
 | 
			
		|||
 | 
			
		||||
void pa_bluetooth_discovery_sync(pa_bluetooth_discovery *d);
 | 
			
		||||
 | 
			
		||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *d, const char* path);
 | 
			
		||||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address);
 | 
			
		||||
pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *d, const char* path);
 | 
			
		||||
pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address);
 | 
			
		||||
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discovery *y, const char *path);
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetooth_device *d, enum profile profile);
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(pa_bluetooth_device *d, enum profile profile);
 | 
			
		||||
 | 
			
		||||
int pa_bluetooth_transport_acquire(pa_bluetooth_transport *t, const char *accesstype, size_t *imtu, size_t *omtu);
 | 
			
		||||
void pa_bluetooth_transport_release(pa_bluetooth_transport *t, const char *accesstype);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -379,7 +379,7 @@ static pa_bt_audio_state_t get_profile_audio_state(const struct userdata *u, con
 | 
			
		|||
 | 
			
		||||
static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
 | 
			
		||||
    const char *accesstype = "rw";
 | 
			
		||||
    const pa_bluetooth_device *d;
 | 
			
		||||
    pa_bluetooth_device *d;
 | 
			
		||||
 | 
			
		||||
    pa_assert(u->transport);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1974,7 +1974,7 @@ static pa_hook_result_t transport_removed_cb(pa_bluetooth_transport *t, void *ca
 | 
			
		|||
 | 
			
		||||
/* Run from main thread */
 | 
			
		||||
static int setup_transport(struct userdata *u) {
 | 
			
		||||
    const pa_bluetooth_device *d;
 | 
			
		||||
    pa_bluetooth_device *d;
 | 
			
		||||
    pa_bluetooth_transport *t;
 | 
			
		||||
 | 
			
		||||
    pa_assert(u);
 | 
			
		||||
| 
						 | 
				
			
			@ -2471,8 +2471,8 @@ static int add_card(struct userdata *u, const pa_bluetooth_device *device) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
/* Run from main thread */
 | 
			
		||||
static const pa_bluetooth_device* find_device(struct userdata *u, const char *address, const char *path) {
 | 
			
		||||
    const pa_bluetooth_device *d = NULL;
 | 
			
		||||
static pa_bluetooth_device* find_device(struct userdata *u, const char *address, const char *path) {
 | 
			
		||||
    pa_bluetooth_device *d = NULL;
 | 
			
		||||
 | 
			
		||||
    pa_assert(u);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2531,7 +2531,7 @@ int pa__init(pa_module* m) {
 | 
			
		|||
    const char *address, *path;
 | 
			
		||||
    DBusError err;
 | 
			
		||||
    char *mike, *speaker;
 | 
			
		||||
    const pa_bluetooth_device *device;
 | 
			
		||||
    pa_bluetooth_device *device;
 | 
			
		||||
 | 
			
		||||
    pa_assert(m);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue