mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	use the description field of sinks/sources to name the zeroconf services, instead of the logical name
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1257 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									6c39af7ad3
								
							
						
					
					
						commit
						1c3bfc44dc
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -240,7 +240,7 @@ finish:
 | 
				
			||||||
    return r;
 | 
					    return r;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct service *get_service(struct userdata *u, const char *name) {
 | 
					static struct service *get_service(struct userdata *u, const char *name, const char *description) {
 | 
				
			||||||
    struct service *s;
 | 
					    struct service *s;
 | 
				
			||||||
    char hn[64];
 | 
					    char hn[64];
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					@ -253,7 +253,7 @@ static struct service *get_service(struct userdata *u, const char *name) {
 | 
				
			||||||
    s->published = UNPUBLISHED;
 | 
					    s->published = UNPUBLISHED;
 | 
				
			||||||
    s->name = pa_xstrdup(name);
 | 
					    s->name = pa_xstrdup(name);
 | 
				
			||||||
    s->loaded.valid = s->autoload.valid = 0;
 | 
					    s->loaded.valid = s->autoload.valid = 0;
 | 
				
			||||||
    s->service_name = pa_sprintf_malloc("%s on %s", s->name, pa_get_host_name(hn, sizeof(hn)));
 | 
					    s->service_name = pa_sprintf_malloc("%s on %s", description ? description : s->name, pa_get_host_name(hn, sizeof(hn)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_hashmap_put(u->services, s->name, s);
 | 
					    pa_hashmap_put(u->services, s->name, s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -265,7 +265,7 @@ static int publish_sink(struct userdata *u, pa_sink *s) {
 | 
				
			||||||
    int ret;
 | 
					    int ret;
 | 
				
			||||||
    assert(u && s);
 | 
					    assert(u && s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    svc = get_service(u, s->name);
 | 
					    svc = get_service(u, s->name, s->description);
 | 
				
			||||||
    if (svc->loaded.valid)
 | 
					    if (svc->loaded.valid)
 | 
				
			||||||
        return publish_service(u, svc);
 | 
					        return publish_service(u, svc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -286,7 +286,7 @@ static int publish_source(struct userdata *u, pa_source *s) {
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    assert(u && s);
 | 
					    assert(u && s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    svc = get_service(u, s->name);
 | 
					    svc = get_service(u, s->name, s->description);
 | 
				
			||||||
    if (svc->loaded.valid)
 | 
					    if (svc->loaded.valid)
 | 
				
			||||||
        return publish_service(u, svc);
 | 
					        return publish_service(u, svc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -309,7 +309,7 @@ static int publish_autoload(struct userdata *u, pa_autoload_entry *s) {
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    assert(u && s);
 | 
					    assert(u && s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    svc = get_service(u, s->name);
 | 
					    svc = get_service(u, s->name, NULL);
 | 
				
			||||||
    if (svc->autoload.valid)
 | 
					    if (svc->autoload.valid)
 | 
				
			||||||
        return publish_service(u, svc);
 | 
					        return publish_service(u, svc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue