mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	implement proper logging
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@179 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									57e473b61c
								
							
						
					
					
						commit
						6c4fd62040
					
				
					 50 changed files with 416 additions and 225 deletions
				
			
		| 
						 | 
				
			
			@ -31,6 +31,7 @@
 | 
			
		|||
#include "client.h"
 | 
			
		||||
#include "xmalloc.h"
 | 
			
		||||
#include "subscribe.h"
 | 
			
		||||
#include "log.h"
 | 
			
		||||
 | 
			
		||||
struct pa_client *pa_client_new(struct pa_core *core, const char *protocol_name, char *name) {
 | 
			
		||||
    struct pa_client *c;
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +50,7 @@ struct pa_client *pa_client_new(struct pa_core *core, const char *protocol_name,
 | 
			
		|||
    r = pa_idxset_put(core->clients, c, &c->index);
 | 
			
		||||
    assert(c->index != PA_IDXSET_INVALID && r >= 0);
 | 
			
		||||
 | 
			
		||||
    fprintf(stderr, "client: created %u \"%s\"\n", c->index, c->name);
 | 
			
		||||
    pa_log(__FILE__": created %u \"%s\"\n", c->index, c->name);
 | 
			
		||||
    pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_NEW, c->index);
 | 
			
		||||
 | 
			
		||||
    pa_core_check_quit(core);
 | 
			
		||||
| 
						 | 
				
			
			@ -64,7 +65,7 @@ void pa_client_free(struct pa_client *c) {
 | 
			
		|||
 | 
			
		||||
    pa_core_check_quit(c->core);
 | 
			
		||||
 | 
			
		||||
    fprintf(stderr, "client: freed %u \"%s\"\n", c->index, c->name);
 | 
			
		||||
    pa_log(__FILE__": freed %u \"%s\"\n", c->index, c->name);
 | 
			
		||||
    pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
 | 
			
		||||
    pa_xfree(c->name);
 | 
			
		||||
    pa_xfree(c);
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +75,7 @@ void pa_client_free(struct pa_client *c) {
 | 
			
		|||
void pa_client_kill(struct pa_client *c) {
 | 
			
		||||
    assert(c);
 | 
			
		||||
    if (!c->kill) {
 | 
			
		||||
        fprintf(stderr, "kill() operation not implemented for client %u\n", c->index);
 | 
			
		||||
        pa_log(__FILE__": kill() operation not implemented for client %u\n", c->index);
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue