mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Fix up according to Coding Style
Only whitespace changes in here
This commit is contained in:
		
							parent
							
								
									5715b2af30
								
							
						
					
					
						commit
						ecf09f2cd6
					
				
					 60 changed files with 297 additions and 418 deletions
				
			
		| 
						 | 
					@ -598,8 +598,7 @@ finish:
 | 
				
			||||||
    pa_dbus_pending_free(p);
 | 
					    pa_dbus_pending_free(p);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void register_endpoint(pa_bluetooth_discovery *y, const char *path, const char *endpoint, const char *uuid)
 | 
					static void register_endpoint(pa_bluetooth_discovery *y, const char *path, const char *endpoint, const char *uuid) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    DBusMessage *m;
 | 
					    DBusMessage *m;
 | 
				
			||||||
    DBusMessageIter i, d;
 | 
					    DBusMessageIter i, d;
 | 
				
			||||||
    uint8_t codec = 0;
 | 
					    uint8_t codec = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -857,8 +857,7 @@ static int stop_stream_fd(struct userdata *u) {
 | 
				
			||||||
    return r;
 | 
					    return r;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void bt_transport_release(struct userdata *u)
 | 
					static void bt_transport_release(struct userdata *u) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    const char *accesstype = "rw";
 | 
					    const char *accesstype = "rw";
 | 
				
			||||||
    const pa_bluetooth_transport *t;
 | 
					    const pa_bluetooth_transport *t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -891,8 +890,7 @@ static void bt_transport_release(struct userdata *u)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int bt_transport_acquire(struct userdata *u, pa_bool_t start)
 | 
					static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    const char *accesstype = "rw";
 | 
					    const char *accesstype = "rw";
 | 
				
			||||||
    const pa_bluetooth_transport *t;
 | 
					    const pa_bluetooth_transport *t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2007,8 +2005,7 @@ static void shutdown_bt(struct userdata *u) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int bt_transport_config_a2dp(struct userdata *u)
 | 
					static int bt_transport_config_a2dp(struct userdata *u) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    const pa_bluetooth_transport *t;
 | 
					    const pa_bluetooth_transport *t;
 | 
				
			||||||
    struct a2dp_info *a2dp = &u->a2dp;
 | 
					    struct a2dp_info *a2dp = &u->a2dp;
 | 
				
			||||||
    sbc_capabilities_raw_t *config;
 | 
					    sbc_capabilities_raw_t *config;
 | 
				
			||||||
| 
						 | 
					@ -2112,8 +2109,7 @@ static int bt_transport_config_a2dp(struct userdata *u)
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int bt_transport_config(struct userdata *u)
 | 
					static int bt_transport_config(struct userdata *u) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    if (u->profile == PROFILE_HSP || u->profile == PROFILE_HFGW) {
 | 
					    if (u->profile == PROFILE_HSP || u->profile == PROFILE_HFGW) {
 | 
				
			||||||
        u->block_size = u->link_mtu;
 | 
					        u->block_size = u->link_mtu;
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
| 
						 | 
					@ -2122,8 +2118,7 @@ static int bt_transport_config(struct userdata *u)
 | 
				
			||||||
    return bt_transport_config_a2dp(u);
 | 
					    return bt_transport_config_a2dp(u);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int parse_transport_property(struct userdata *u, DBusMessageIter *i)
 | 
					static int parse_transport_property(struct userdata *u, DBusMessageIter *i) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    const char *key;
 | 
					    const char *key;
 | 
				
			||||||
    DBusMessageIter variant_i;
 | 
					    DBusMessageIter variant_i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2168,8 +2163,7 @@ static int parse_transport_property(struct userdata *u, DBusMessageIter *i)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Run from main thread */
 | 
					/* Run from main thread */
 | 
				
			||||||
static int bt_transport_open(struct userdata *u)
 | 
					static int bt_transport_open(struct userdata *u) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    DBusMessage *m, *r;
 | 
					    DBusMessage *m, *r;
 | 
				
			||||||
    DBusMessageIter arg_i, element_i;
 | 
					    DBusMessageIter arg_i, element_i;
 | 
				
			||||||
    DBusError err;
 | 
					    DBusError err;
 | 
				
			||||||
| 
						 | 
					@ -2855,10 +2849,7 @@ void pa__done(pa_module *m) {
 | 
				
			||||||
            speaker = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='SpeakerGainChanged',path='%s'", u->path);
 | 
					            speaker = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='SpeakerGainChanged',path='%s'", u->path);
 | 
				
			||||||
            mike = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='MicrophoneGainChanged',path='%s'", u->path);
 | 
					            mike = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='MicrophoneGainChanged',path='%s'", u->path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_dbus_remove_matches(pa_dbus_connection_get(u->connection),
 | 
					            pa_dbus_remove_matches(pa_dbus_connection_get(u->connection), speaker, mike, NULL);
 | 
				
			||||||
                                   speaker,
 | 
					 | 
				
			||||||
                                   mike,
 | 
					 | 
				
			||||||
                                   NULL);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_xfree(speaker);
 | 
					            pa_xfree(speaker);
 | 
				
			||||||
            pa_xfree(mike);
 | 
					            pa_xfree(mike);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -98,8 +98,7 @@ fail:
 | 
				
			||||||
    return FALSE;
 | 
					    return FALSE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out)
 | 
					void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned int i;
 | 
					    unsigned int i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (i = 0; i < ec->params.priv.adrian.blocksize; i += 2) {
 | 
					    for (i = 0; i < ec->params.priv.adrian.blocksize; i += 2) {
 | 
				
			||||||
| 
						 | 
					@ -110,8 +109,7 @@ void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_adrian_ec_done(pa_echo_canceller *ec)
 | 
					void pa_adrian_ec_done(pa_echo_canceller *ec) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_xfree(ec->params.priv.adrian.aec);
 | 
					    pa_xfree(ec->params.priv.adrian.aec);
 | 
				
			||||||
    ec->params.priv.adrian.aec = NULL;
 | 
					    ec->params.priv.adrian.aec = NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1300,8 +1300,7 @@ static void sink_input_mute_changed_cb(pa_sink_input *i) {
 | 
				
			||||||
    pa_sink_mute_changed(u->sink, i->muted);
 | 
					    pa_sink_mute_changed(u->sink, i->muted);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static pa_echo_canceller_method_t get_ec_method_from_string(const char *method)
 | 
					static pa_echo_canceller_method_t get_ec_method_from_string(const char *method) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    if (strcmp(method, "speex") == 0)
 | 
					    if (strcmp(method, "speex") == 0)
 | 
				
			||||||
        return PA_ECHO_CANCELLER_SPEEX;
 | 
					        return PA_ECHO_CANCELLER_SPEEX;
 | 
				
			||||||
    else if (strcmp(method, "adrian") == 0)
 | 
					    else if (strcmp(method, "adrian") == 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -104,13 +104,11 @@ fail:
 | 
				
			||||||
    return FALSE;
 | 
					    return FALSE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_speex_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out)
 | 
					void pa_speex_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    speex_echo_cancellation(ec->params.priv.speex.state, (const spx_int16_t *) rec, (const spx_int16_t *) play, (spx_int16_t *) out);
 | 
					    speex_echo_cancellation(ec->params.priv.speex.state, (const spx_int16_t *) rec, (const spx_int16_t *) play, (spx_int16_t *) out);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_speex_ec_done(pa_echo_canceller *ec)
 | 
					void pa_speex_ec_done(pa_echo_canceller *ec) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    speex_echo_state_destroy(ec->params.priv.speex.state);
 | 
					    speex_echo_state_destroy(ec->params.priv.speex.state);
 | 
				
			||||||
    ec->params.priv.speex.state = NULL;
 | 
					    ec->params.priv.speex.state = NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,8 +84,7 @@ struct userdata {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void ensure_ports_stopped(struct userdata* u)
 | 
					static void ensure_ports_stopped(struct userdata* u) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    int i;
 | 
					    int i;
 | 
				
			||||||
    pa_assert(u);
 | 
					    pa_assert(u);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,8 +96,7 @@ static void ensure_ports_stopped(struct userdata* u)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void ensure_ports_started(struct userdata* u)
 | 
					static void ensure_ports_started(struct userdata* u) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    int i;
 | 
					    int i;
 | 
				
			||||||
    pa_assert(u);
 | 
					    pa_assert(u);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -120,8 +118,7 @@ static void ensure_ports_started(struct userdata* u)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static pa_bool_t check_service_started(struct userdata* u)
 | 
					static pa_bool_t check_service_started(struct userdata* u) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    DBusError error;
 | 
					    DBusError error;
 | 
				
			||||||
    DBusMessage *m = NULL, *reply = NULL;
 | 
					    DBusMessage *m = NULL, *reply = NULL;
 | 
				
			||||||
    pa_bool_t new_status = FALSE;
 | 
					    pa_bool_t new_status = FALSE;
 | 
				
			||||||
| 
						 | 
					@ -169,8 +166,7 @@ finish:
 | 
				
			||||||
    return new_status;
 | 
					    return new_status;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static DBusHandlerResult dbus_filter_handler(DBusConnection *c,	DBusMessage *s,	void *userdata)
 | 
					static DBusHandlerResult dbus_filter_handler(DBusConnection *c, DBusMessage *s, void *userdata) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    struct userdata *u = NULL;
 | 
					    struct userdata *u = NULL;
 | 
				
			||||||
    DBusError error;
 | 
					    DBusError error;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -182,9 +178,7 @@ static DBusHandlerResult dbus_filter_handler(DBusConnection *c,	DBusMessage *s,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (dbus_message_is_signal(s, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
 | 
					    if (dbus_message_is_signal(s, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
 | 
				
			||||||
        const char *name, *old, *new;
 | 
					        const char *name, *old, *new;
 | 
				
			||||||
        if (!dbus_message_get_args(
 | 
					        if (!dbus_message_get_args(s, &error,
 | 
				
			||||||
			    s,
 | 
					 | 
				
			||||||
			    &error,
 | 
					 | 
				
			||||||
                                   DBUS_TYPE_STRING, &name,
 | 
					                                   DBUS_TYPE_STRING, &name,
 | 
				
			||||||
                                   DBUS_TYPE_STRING, &old,
 | 
					                                   DBUS_TYPE_STRING, &old,
 | 
				
			||||||
                                   DBUS_TYPE_STRING, &new,
 | 
					                                   DBUS_TYPE_STRING, &new,
 | 
				
			||||||
| 
						 | 
					@ -211,8 +205,7 @@ finish:
 | 
				
			||||||
    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 | 
					    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa__init(pa_module *m)
 | 
					int pa__init(pa_module *m) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    DBusError error;
 | 
					    DBusError error;
 | 
				
			||||||
    pa_dbus_connection *connection = NULL;
 | 
					    pa_dbus_connection *connection = NULL;
 | 
				
			||||||
    struct userdata *u = NULL;
 | 
					    struct userdata *u = NULL;
 | 
				
			||||||
| 
						 | 
					@ -275,8 +268,7 @@ fail:
 | 
				
			||||||
    return -1;
 | 
					    return -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa__done(pa_module *m)
 | 
					void pa__done(pa_module *m) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    struct userdata *u;
 | 
					    struct userdata *u;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_assert(m);
 | 
					    pa_assert(m);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -191,9 +191,7 @@ static void update_rule(struct rule *r) {
 | 
				
			||||||
                    continue;
 | 
					                    continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                pa_xfree(fn);
 | 
					                pa_xfree(fn);
 | 
				
			||||||
                fn = pa_sprintf_malloc(DESKTOPFILEDIR
 | 
					                fn = pa_sprintf_malloc(DESKTOPFILEDIR PA_PATH_SEP "%s" PA_PATH_SEP "%s.desktop", dir->d_name, r->process_name);
 | 
				
			||||||
                                       PA_PATH_SEP "%s" PA_PATH_SEP "%s.desktop",
 | 
					 | 
				
			||||||
                                       dir->d_name, r->process_name);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (stat(fn, &st) == 0) {
 | 
					                if (stat(fn, &st) == 0) {
 | 
				
			||||||
                    found = TRUE;
 | 
					                    found = TRUE;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1209,9 +1209,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
 | 
				
			||||||
            if (first) {
 | 
					            if (first) {
 | 
				
			||||||
                first = FALSE;
 | 
					                first = FALSE;
 | 
				
			||||||
                sink_mode = (0 == strncmp("sink:", s, 5));
 | 
					                sink_mode = (0 == strncmp("sink:", s, 5));
 | 
				
			||||||
            } else if ((sink_mode && 0 != strncmp("sink:", s, 5))
 | 
					            } else if ((sink_mode && 0 != strncmp("sink:", s, 5)) || (!sink_mode && 0 != strncmp("source:", s, 7))) {
 | 
				
			||||||
                       || (!sink_mode && 0 != strncmp("source:", s, 7)))
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                while ((device = pa_hashmap_steal_first(h))) {
 | 
					                while ((device = pa_hashmap_steal_first(h))) {
 | 
				
			||||||
                    pa_xfree(device->device);
 | 
					                    pa_xfree(device->device);
 | 
				
			||||||
                    pa_xfree(device);
 | 
					                    pa_xfree(device);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -723,10 +723,7 @@ static DBusHandlerResult root_handler(DBusConnection *c, DBusMessage *m, void *u
 | 
				
			||||||
        const char *xml = ROOT_INTROSPECT_XML;
 | 
					        const char *xml = ROOT_INTROSPECT_XML;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        pa_assert_se(r = dbus_message_new_method_return(m));
 | 
					        pa_assert_se(r = dbus_message_new_method_return(m));
 | 
				
			||||||
        pa_assert_se(dbus_message_append_args(
 | 
					        pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
 | 
				
			||||||
                             r,
 | 
					 | 
				
			||||||
                             DBUS_TYPE_STRING, &xml,
 | 
					 | 
				
			||||||
                             DBUS_TYPE_INVALID));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    } else
 | 
					    } else
 | 
				
			||||||
        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 | 
					        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 | 
				
			||||||
| 
						 | 
					@ -938,10 +935,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
 | 
				
			||||||
            xml = pa_strbuf_tostring_free(sb);
 | 
					            xml = pa_strbuf_tostring_free(sb);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_assert_se(r = dbus_message_new_method_return(m));
 | 
					            pa_assert_se(r = dbus_message_new_method_return(m));
 | 
				
			||||||
            pa_assert_se(dbus_message_append_args(
 | 
					            pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
 | 
				
			||||||
                                 r,
 | 
					 | 
				
			||||||
                                 DBUS_TYPE_STRING, &xml,
 | 
					 | 
				
			||||||
                                 DBUS_TYPE_INVALID));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_xfree(xml);
 | 
					            pa_xfree(xml);
 | 
				
			||||||
        } else
 | 
					        } else
 | 
				
			||||||
| 
						 | 
					@ -1012,10 +1006,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
 | 
				
			||||||
                ITEM_INTROSPECT_XML;
 | 
					                ITEM_INTROSPECT_XML;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_assert_se(r = dbus_message_new_method_return(m));
 | 
					            pa_assert_se(r = dbus_message_new_method_return(m));
 | 
				
			||||||
            pa_assert_se(dbus_message_append_args(
 | 
					            pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
 | 
				
			||||||
                                 r,
 | 
					 | 
				
			||||||
                                 DBUS_TYPE_STRING, &xml,
 | 
					 | 
				
			||||||
                                 DBUS_TYPE_INVALID));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        } else
 | 
					        } else
 | 
				
			||||||
            return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 | 
					            return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -973,8 +973,7 @@ static void server_info_cb(pa_pdispatch *pd, uint32_t command,  uint32_t tag, pa
 | 
				
			||||||
        pa_tagstruct_gets(t, &default_sink_name) < 0 ||
 | 
					        pa_tagstruct_gets(t, &default_sink_name) < 0 ||
 | 
				
			||||||
        pa_tagstruct_gets(t, &default_source_name) < 0 ||
 | 
					        pa_tagstruct_gets(t, &default_source_name) < 0 ||
 | 
				
			||||||
        pa_tagstruct_getu32(t, &cookie) < 0 ||
 | 
					        pa_tagstruct_getu32(t, &cookie) < 0 ||
 | 
				
			||||||
        (u->version >= 15 &&
 | 
					        (u->version >= 15 && pa_tagstruct_get_channel_map(t, &cm) < 0)) {
 | 
				
			||||||
         pa_tagstruct_get_channel_map(t, &cm) < 0)) {
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        pa_log("Parse failure");
 | 
					        pa_log("Parse failure");
 | 
				
			||||||
        goto fail;
 | 
					        goto fail;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -442,8 +442,7 @@ static void process_device(struct userdata *u, struct udev_device *dev) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (action && pa_streq(action, "remove"))
 | 
					    if (action && pa_streq(action, "remove"))
 | 
				
			||||||
        remove_card(u, dev);
 | 
					        remove_card(u, dev);
 | 
				
			||||||
    else if ((!action || pa_streq(action, "change")) &&
 | 
					    else if ((!action || pa_streq(action, "change")) && udev_device_get_property_value(dev, "SOUND_INITIALIZED"))
 | 
				
			||||||
             udev_device_get_property_value(dev, "SOUND_INITIALIZED"))
 | 
					 | 
				
			||||||
        card_changed(u, dev);
 | 
					        card_changed(u, dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* For an explanation why we don't look for 'add' events here
 | 
					    /* For an explanation why we don't look for 'add' events here
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,8 +38,7 @@
 | 
				
			||||||
static const char base64_chars[] =
 | 
					static const char base64_chars[] =
 | 
				
			||||||
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 | 
					    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int pos(char c)
 | 
					static int pos(char c) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    if (c >= 'A' && c <= 'Z') return c - 'A' + 0;
 | 
					    if (c >= 'A' && c <= 'Z') return c - 'A' + 0;
 | 
				
			||||||
    if (c >= 'a' && c <= 'z') return c - 'a' + 26;
 | 
					    if (c >= 'a' && c <= 'z') return c - 'a' + 26;
 | 
				
			||||||
    if (c >= '0' && c <= '9') return c - '0' + 52;
 | 
					    if (c >= '0' && c <= '9') return c - '0' + 52;
 | 
				
			||||||
| 
						 | 
					@ -48,8 +47,7 @@ static int pos(char c)
 | 
				
			||||||
    return -1;
 | 
					    return -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_base64_encode(const void *data, int size, char **str)
 | 
					int pa_base64_encode(const void *data, int size, char **str) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    char *s, *p;
 | 
					    char *s, *p;
 | 
				
			||||||
    int i;
 | 
					    int i;
 | 
				
			||||||
    int c;
 | 
					    int c;
 | 
				
			||||||
| 
						 | 
					@ -84,8 +82,7 @@ int pa_base64_encode(const void *data, int size, char **str)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define DECODE_ERROR 0xffffffff
 | 
					#define DECODE_ERROR 0xffffffff
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static unsigned int token_decode(const char *token)
 | 
					static unsigned int token_decode(const char *token) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    int i;
 | 
					    int i;
 | 
				
			||||||
    unsigned int val = 0;
 | 
					    unsigned int val = 0;
 | 
				
			||||||
    int marker = 0;
 | 
					    int marker = 0;
 | 
				
			||||||
| 
						 | 
					@ -109,8 +106,7 @@ static unsigned int token_decode(const char *token)
 | 
				
			||||||
    return (marker << 24) | val;
 | 
					    return (marker << 24) | val;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_base64_decode(const char *str, void *data)
 | 
					int pa_base64_decode(const char *str, void *data) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    const char *p;
 | 
					    const char *p;
 | 
				
			||||||
    unsigned char *q;
 | 
					    unsigned char *q;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -174,8 +174,7 @@ static int rsa_encrypt(uint8_t *text, int len, uint8_t *res) {
 | 
				
			||||||
    return size;
 | 
					    return size;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int aes_encrypt(pa_raop_client* c, uint8_t *data, int size)
 | 
					static int aes_encrypt(pa_raop_client* c, uint8_t *data, int size) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    uint8_t *buf;
 | 
					    uint8_t *buf;
 | 
				
			||||||
    int i=0, j;
 | 
					    int i=0, j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -194,8 +193,7 @@ static int aes_encrypt(pa_raop_client* c, uint8_t *data, int size)
 | 
				
			||||||
    return i;
 | 
					    return i;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void rtrimchar(char *str, char rc)
 | 
					static inline void rtrimchar(char *str, char rc) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    char *sp = str + strlen(str) - 1;
 | 
					    char *sp = str + strlen(str) - 1;
 | 
				
			||||||
    while (sp >= str && *sp == rc) {
 | 
					    while (sp >= str && *sp == rc) {
 | 
				
			||||||
        *sp = '\0';
 | 
					        *sp = '\0';
 | 
				
			||||||
| 
						 | 
					@ -232,8 +230,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
 | 
				
			||||||
    c->callback(c->fd, c->userdata);
 | 
					    c->callback(c->fd, c->userdata);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* headers, void *userdata)
 | 
					static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* headers, void *userdata) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_raop_client* c = userdata;
 | 
					    pa_raop_client* c = userdata;
 | 
				
			||||||
    pa_assert(c);
 | 
					    pa_assert(c);
 | 
				
			||||||
    pa_assert(rtsp);
 | 
					    pa_assert(rtsp);
 | 
				
			||||||
| 
						 | 
					@ -368,8 +365,7 @@ static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* he
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pa_raop_client* pa_raop_client_new(pa_core *core, const char* host)
 | 
					pa_raop_client* pa_raop_client_new(pa_core *core, const char* host) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_raop_client* c = pa_xnew0(pa_raop_client, 1);
 | 
					    pa_raop_client* c = pa_xnew0(pa_raop_client, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_assert(core);
 | 
					    pa_assert(core);
 | 
				
			||||||
| 
						 | 
					@ -387,8 +383,7 @@ pa_raop_client* pa_raop_client_new(pa_core *core, const char* host)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_raop_client_free(pa_raop_client* c)
 | 
					void pa_raop_client_free(pa_raop_client* c) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_assert(c);
 | 
					    pa_assert(c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (c->rtsp)
 | 
					    if (c->rtsp)
 | 
				
			||||||
| 
						 | 
					@ -398,8 +393,7 @@ void pa_raop_client_free(pa_raop_client* c)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_raop_connect(pa_raop_client* c)
 | 
					int pa_raop_connect(pa_raop_client* c) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    char *sci;
 | 
					    char *sci;
 | 
				
			||||||
    struct {
 | 
					    struct {
 | 
				
			||||||
        uint32_t a;
 | 
					        uint32_t a;
 | 
				
			||||||
| 
						 | 
					@ -433,8 +427,7 @@ int pa_raop_connect(pa_raop_client* c)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_raop_flush(pa_raop_client* c)
 | 
					int pa_raop_flush(pa_raop_client* c) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_assert(c);
 | 
					    pa_assert(c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_rtsp_flush(c->rtsp, c->seq, c->rtptime);
 | 
					    pa_rtsp_flush(c->rtsp, c->seq, c->rtptime);
 | 
				
			||||||
| 
						 | 
					@ -442,8 +435,7 @@ int pa_raop_flush(pa_raop_client* c)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume)
 | 
					int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    int rv;
 | 
					    int rv;
 | 
				
			||||||
    double db;
 | 
					    double db;
 | 
				
			||||||
    char *param;
 | 
					    char *param;
 | 
				
			||||||
| 
						 | 
					@ -465,8 +457,7 @@ int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchunk* encoded)
 | 
					int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchunk* encoded) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    uint16_t len;
 | 
					    uint16_t len;
 | 
				
			||||||
    size_t bufmax;
 | 
					    size_t bufmax;
 | 
				
			||||||
    uint8_t *bp, bpos;
 | 
					    uint8_t *bp, bpos;
 | 
				
			||||||
| 
						 | 
					@ -548,16 +539,14 @@ int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchun
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata)
 | 
					void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_assert(c);
 | 
					    pa_assert(c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    c->callback = callback;
 | 
					    c->callback = callback;
 | 
				
			||||||
    c->userdata = userdata;
 | 
					    c->userdata = userdata;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_raop_client_set_closed_callback(pa_raop_client* c, pa_raop_client_closed_cb_t callback, void *userdata)
 | 
					void pa_raop_client_set_closed_callback(pa_raop_client* c, pa_raop_client_closed_cb_t callback, void *userdata) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_assert(c);
 | 
					    pa_assert(c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    c->closed_callback = callback;
 | 
					    c->closed_callback = callback;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -372,8 +372,7 @@ void pa_rtsp_set_url(pa_rtsp_client* c, const char* url) {
 | 
				
			||||||
    c->url = pa_xstrdup(url);
 | 
					    c->url = pa_xstrdup(url);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_rtsp_add_header(pa_rtsp_client *c, const char* key, const char* value)
 | 
					void pa_rtsp_add_header(pa_rtsp_client *c, const char* key, const char* value) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_assert(c);
 | 
					    pa_assert(c);
 | 
				
			||||||
    pa_assert(key);
 | 
					    pa_assert(key);
 | 
				
			||||||
    pa_assert(value);
 | 
					    pa_assert(value);
 | 
				
			||||||
| 
						 | 
					@ -381,8 +380,7 @@ void pa_rtsp_add_header(pa_rtsp_client *c, const char* key, const char* value)
 | 
				
			||||||
    pa_headerlist_puts(c->headers, key, value);
 | 
					    pa_headerlist_puts(c->headers, key, value);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa_rtsp_remove_header(pa_rtsp_client *c, const char* key)
 | 
					void pa_rtsp_remove_header(pa_rtsp_client *c, const char* key) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_assert(c);
 | 
					    pa_assert(c);
 | 
				
			||||||
    pa_assert(key);
 | 
					    pa_assert(key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1043,8 +1043,7 @@ static int is_group(gid_t gid, const char *name) {
 | 
				
			||||||
    int r = -1;
 | 
					    int r = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    errno = 0;
 | 
					    errno = 0;
 | 
				
			||||||
    if (!(group = pa_getgrgid_malloc(gid)))
 | 
					    if (!(group = pa_getgrgid_malloc(gid))) {
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (!errno)
 | 
					        if (!errno)
 | 
				
			||||||
            errno = ENOENT;
 | 
					            errno = ENOENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1110,8 +1109,7 @@ int pa_uid_in_group(uid_t uid, const char *name) {
 | 
				
			||||||
    int r = -1;
 | 
					    int r = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    errno = 0;
 | 
					    errno = 0;
 | 
				
			||||||
    if (!(group = pa_getgrnam_malloc(name)))
 | 
					    if (!(group = pa_getgrnam_malloc(name))) {
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (!errno)
 | 
					        if (!errno)
 | 
				
			||||||
            errno = ENOENT;
 | 
					            errno = ENOENT;
 | 
				
			||||||
        goto finish;
 | 
					        goto finish;
 | 
				
			||||||
| 
						 | 
					@ -1146,8 +1144,7 @@ gid_t pa_get_gid_of_group(const char *name) {
 | 
				
			||||||
    struct group *gr = NULL;
 | 
					    struct group *gr = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    errno = 0;
 | 
					    errno = 0;
 | 
				
			||||||
    if (!(gr = pa_getgrnam_malloc(name)))
 | 
					    if (!(gr = pa_getgrnam_malloc(name))) {
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (!errno)
 | 
					        if (!errno)
 | 
				
			||||||
            errno = ENOENT;
 | 
					            errno = ENOENT;
 | 
				
			||||||
        goto finish;
 | 
					        goto finish;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,9 +31,7 @@
 | 
				
			||||||
#include "cpu-x86.h"
 | 
					#include "cpu-x86.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined (__i386__) || defined (__amd64__)
 | 
					#if defined (__i386__) || defined (__amd64__)
 | 
				
			||||||
static void
 | 
					static void get_cpuid(uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) {
 | 
				
			||||||
get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    __asm__ __volatile__ (
 | 
					    __asm__ __volatile__ (
 | 
				
			||||||
        "  push %%"PA_REG_b"   \n\t"
 | 
					        "  push %%"PA_REG_b"   \n\t"
 | 
				
			||||||
        "  cpuid               \n\t"
 | 
					        "  cpuid               \n\t"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -531,9 +531,7 @@ static void memblock_free(pa_memblock *b) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_mutex_lock(import->mutex);
 | 
					            pa_mutex_lock(import->mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_assert_se(pa_hashmap_remove(
 | 
					            pa_assert_se(pa_hashmap_remove(import->blocks, PA_UINT32_TO_PTR(b->per_type.imported.id)));
 | 
				
			||||||
                                 import->blocks,
 | 
					 | 
				
			||||||
                                 PA_UINT32_TO_PTR(b->per_type.imported.id)));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_assert(segment->n_blocks >= 1);
 | 
					            pa_assert(segment->n_blocks >= 1);
 | 
				
			||||||
            if (-- segment->n_blocks <= 0)
 | 
					            if (-- segment->n_blocks <= 0)
 | 
				
			||||||
| 
						 | 
					@ -693,9 +691,7 @@ static void memblock_replace_import(pa_memblock *b) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_mutex_lock(import->mutex);
 | 
					    pa_mutex_lock(import->mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_assert_se(pa_hashmap_remove(
 | 
					    pa_assert_se(pa_hashmap_remove(import->blocks, PA_UINT32_TO_PTR(b->per_type.imported.id)));
 | 
				
			||||||
                         import->blocks,
 | 
					 | 
				
			||||||
                         PA_UINT32_TO_PTR(b->per_type.imported.id)));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    memblock_make_local(b);
 | 
					    memblock_make_local(b);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,8 +43,7 @@
 | 
				
			||||||
#define POLLNVAL        0x020           /* Invalid polling request.  */
 | 
					#define POLLNVAL        0x020           /* Invalid polling request.  */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Data structure describing a polling request.  */
 | 
					/* Data structure describing a polling request.  */
 | 
				
			||||||
struct pollfd
 | 
					struct pollfd {
 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    int fd;                     /* File descriptor to poll.  */
 | 
					    int fd;                     /* File descriptor to poll.  */
 | 
				
			||||||
    short int events;           /* Types of events poller cares about.  */
 | 
					    short int events;           /* Types of events poller cares about.  */
 | 
				
			||||||
    short int revents;          /* Types of events that actually occurred.  */
 | 
					    short int revents;          /* Types of events that actually occurred.  */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,8 +30,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "semaphore.h"
 | 
					#include "semaphore.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct pa_semaphore
 | 
					struct pa_semaphore {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    MPSemaphoreID sema;
 | 
					    MPSemaphoreID sema;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,8 +30,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "semaphore.h"
 | 
					#include "semaphore.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct pa_semaphore
 | 
					struct pa_semaphore {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    HANDLE sema;
 | 
					    HANDLE sema;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -304,8 +304,7 @@ int pa_sndfile_write_channel_map(SNDFILE *sf, pa_channel_map *cm) {
 | 
				
			||||||
        channels[c] = table[cm->map[c]];
 | 
					        channels[c] = table[cm->map[c]];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!sf_command(sf, SFC_SET_CHANNEL_MAP_INFO,
 | 
					    if (!sf_command(sf, SFC_SET_CHANNEL_MAP_INFO, channels, sizeof(channels[0]) * cm->channels)) {
 | 
				
			||||||
                    channels, sizeof(channels[0]) * cm->channels)) {
 | 
					 | 
				
			||||||
        pa_xfree(channels);
 | 
					        pa_xfree(channels);
 | 
				
			||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,9 +43,7 @@
 | 
				
			||||||
    " addcs r0, %1                  \n\t" \
 | 
					    " addcs r0, %1                  \n\t" \
 | 
				
			||||||
    " movcs r6, r0                  \n\t"
 | 
					    " movcs r6, r0                  \n\t"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s16ne_arm(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s16ne_arm (int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    int32_t *ve;
 | 
					    int32_t *ve;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Channels must be at least 4, and always a multiple of the original number.
 | 
					    /* Channels must be at least 4, and always a multiple of the original number.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,9 +32,7 @@
 | 
				
			||||||
#include "sample-util.h"
 | 
					#include "sample-util.h"
 | 
				
			||||||
#include "endianmacros.h"
 | 
					#include "endianmacros.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_u8_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_u8_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (channel = 0; length; length--) {
 | 
					    for (channel = 0; length; length--) {
 | 
				
			||||||
| 
						 | 
					@ -53,9 +51,7 @@ pa_volume_u8_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_alaw_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_alaw_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (channel = 0; length; length--) {
 | 
					    for (channel = 0; length; length--) {
 | 
				
			||||||
| 
						 | 
					@ -74,9 +70,7 @@ pa_volume_alaw_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigne
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_ulaw_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_ulaw_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (channel = 0; length; length--) {
 | 
					    for (channel = 0; length; length--) {
 | 
				
			||||||
| 
						 | 
					@ -95,9 +89,7 @@ pa_volume_ulaw_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigne
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s16ne_c(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s16ne_c (int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(int16_t);
 | 
					    length /= sizeof(int16_t);
 | 
				
			||||||
| 
						 | 
					@ -124,9 +116,7 @@ pa_volume_s16ne_c (int16_t *samples, int32_t *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s16re_c(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s16re_c (int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(int16_t);
 | 
					    length /= sizeof(int16_t);
 | 
				
			||||||
| 
						 | 
					@ -147,9 +137,7 @@ pa_volume_s16re_c (int16_t *samples, int32_t *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_float32ne_c(float *samples, float *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_float32ne_c (float *samples, float *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(float);
 | 
					    length /= sizeof(float);
 | 
				
			||||||
| 
						 | 
					@ -162,9 +150,7 @@ pa_volume_float32ne_c (float *samples, float *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_float32re_c(float *samples, float *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_float32re_c (float *samples, float *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(float);
 | 
					    length /= sizeof(float);
 | 
				
			||||||
| 
						 | 
					@ -181,9 +167,7 @@ pa_volume_float32re_c (float *samples, float *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s32ne_c(int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s32ne_c (int32_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(int32_t);
 | 
					    length /= sizeof(int32_t);
 | 
				
			||||||
| 
						 | 
					@ -201,9 +185,7 @@ pa_volume_s32ne_c (int32_t *samples, int32_t *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s32re_c(int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s32re_c (int32_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(int32_t);
 | 
					    length /= sizeof(int32_t);
 | 
				
			||||||
| 
						 | 
					@ -221,9 +203,7 @@ pa_volume_s32re_c (int32_t *samples, int32_t *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s24ne_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s24ne_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
    uint8_t *e;
 | 
					    uint8_t *e;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -242,9 +222,7 @@ pa_volume_s24ne_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s24re_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s24re_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
    uint8_t *e;
 | 
					    uint8_t *e;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -263,9 +241,7 @@ pa_volume_s24re_c (uint8_t *samples, int32_t *volumes, unsigned channels, unsign
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s24_32ne_c(uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s24_32ne_c (uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(uint32_t);
 | 
					    length /= sizeof(uint32_t);
 | 
				
			||||||
| 
						 | 
					@ -283,9 +259,7 @@ pa_volume_s24_32ne_c (uint32_t *samples, int32_t *volumes, unsigned channels, un
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s24_32re_c(uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s24_32re_c (uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length /= sizeof(uint32_t);
 | 
					    length /= sizeof(uint32_t);
 | 
				
			||||||
| 
						 | 
					@ -303,8 +277,7 @@ pa_volume_s24_32re_c (uint32_t *samples, int32_t *volumes, unsigned channels, un
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static pa_do_volume_func_t do_volume_table[] =
 | 
					static pa_do_volume_func_t do_volume_table[] = {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    [PA_SAMPLE_U8]        = (pa_do_volume_func_t) pa_volume_u8_c,
 | 
					    [PA_SAMPLE_U8]        = (pa_do_volume_func_t) pa_volume_u8_c,
 | 
				
			||||||
    [PA_SAMPLE_ALAW]      = (pa_do_volume_func_t) pa_volume_alaw_c,
 | 
					    [PA_SAMPLE_ALAW]      = (pa_do_volume_func_t) pa_volume_alaw_c,
 | 
				
			||||||
    [PA_SAMPLE_ULAW]      = (pa_do_volume_func_t) pa_volume_ulaw_c,
 | 
					    [PA_SAMPLE_ULAW]      = (pa_do_volume_func_t) pa_volume_ulaw_c,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -95,9 +95,7 @@
 | 
				
			||||||
      " por %%mm4, "#s1"             \n\t" /* .. |  l  h |  */ \
 | 
					      " por %%mm4, "#s1"             \n\t" /* .. |  l  h |  */ \
 | 
				
			||||||
      " por %%mm5, "#s2"             \n\t"
 | 
					      " por %%mm5, "#s2"             \n\t"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s16ne_mmx(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s16ne_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_reg_x86 channel, temp;
 | 
					    pa_reg_x86 channel, temp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Channels must be at least 4, and always a multiple of the original number.
 | 
					    /* Channels must be at least 4, and always a multiple of the original number.
 | 
				
			||||||
| 
						 | 
					@ -162,9 +160,7 @@ pa_volume_s16ne_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsi
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s16re_mmx(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s16re_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_reg_x86 channel, temp;
 | 
					    pa_reg_x86 channel, temp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Channels must be at least 4, and always a multiple of the original number.
 | 
					    /* Channels must be at least 4, and always a multiple of the original number.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,9 +79,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int channel_overread_table[8] = {8,8,8,12,8,10,12,14};
 | 
					static int channel_overread_table[8] = {8,8,8,12,8,10,12,14};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s16ne_sse2(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s16ne_sse2 (int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_reg_x86 channel, temp;
 | 
					    pa_reg_x86 channel, temp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Channels must be at least 8 and always a multiple of the original number.
 | 
					    /* Channels must be at least 8 and always a multiple of the original number.
 | 
				
			||||||
| 
						 | 
					@ -161,9 +159,7 @@ pa_volume_s16ne_sse2 (int16_t *samples, int32_t *volumes, unsigned channels, uns
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void pa_volume_s16re_sse2(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
 | 
				
			||||||
pa_volume_s16re_sse2 (int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    pa_reg_x86 channel, temp;
 | 
					    pa_reg_x86 channel, temp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Channels must be at least 8 and always a multiple of the original number.
 | 
					    /* Channels must be at least 8 and always a multiple of the original number.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -142,9 +142,7 @@ struct group *pa_getgrgid_malloc(gid_t gid) {
 | 
				
			||||||
    getgr_buflen = buflen - sizeof(struct group);
 | 
					    getgr_buflen = buflen - sizeof(struct group);
 | 
				
			||||||
    getgr_buf = (char *)buf + sizeof(struct group);
 | 
					    getgr_buf = (char *)buf + sizeof(struct group);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while ((err = getgrgid_r(gid, (struct group *)buf, getgr_buf,
 | 
					    while ((err = getgrgid_r(gid, (struct group *)buf, getgr_buf, getgr_buflen, &result)) == ERANGE) {
 | 
				
			||||||
                    getgr_buflen, &result)) == ERANGE)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
					        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -203,9 +201,7 @@ struct group *pa_getgrnam_malloc(const char *name) {
 | 
				
			||||||
    getgr_buflen = buflen - sizeof(struct group);
 | 
					    getgr_buflen = buflen - sizeof(struct group);
 | 
				
			||||||
    getgr_buf = (char *)buf + sizeof(struct group);
 | 
					    getgr_buf = (char *)buf + sizeof(struct group);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while ((err = getgrnam_r(name, (struct group *)buf, getgr_buf,
 | 
					    while ((err = getgrnam_r(name, (struct group *)buf, getgr_buf, getgr_buflen, &result)) == ERANGE) {
 | 
				
			||||||
                    getgr_buflen, &result)) == ERANGE)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
					        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -268,9 +264,7 @@ struct passwd *pa_getpwnam_malloc(const char *name) {
 | 
				
			||||||
    getpw_buflen = buflen - sizeof(struct passwd);
 | 
					    getpw_buflen = buflen - sizeof(struct passwd);
 | 
				
			||||||
    getpw_buf = (char *)buf + sizeof(struct passwd);
 | 
					    getpw_buf = (char *)buf + sizeof(struct passwd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while ((err = getpwnam_r(name, (struct passwd *)buf, getpw_buf,
 | 
					    while ((err = getpwnam_r(name, (struct passwd *)buf, getpw_buf, getpw_buflen, &result)) == ERANGE) {
 | 
				
			||||||
                    getpw_buflen, &result)) == ERANGE)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
					        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -329,9 +323,7 @@ struct passwd *pa_getpwuid_malloc(uid_t uid) {
 | 
				
			||||||
    getpw_buflen = buflen - sizeof(struct passwd);
 | 
					    getpw_buflen = buflen - sizeof(struct passwd);
 | 
				
			||||||
    getpw_buf = (char *)buf + sizeof(struct passwd);
 | 
					    getpw_buf = (char *)buf + sizeof(struct passwd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while ((err = getpwuid_r(uid, (struct passwd *)buf, getpw_buf,
 | 
					    while ((err = getpwuid_r(uid, (struct passwd *)buf, getpw_buf, getpw_buflen, &result)) == ERANGE) {
 | 
				
			||||||
                    getpw_buflen, &result)) == ERANGE)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
					        if (expand_buffer_trashcontents(&buf, &buflen))
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,8 +34,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define PA_XCB_FORMAT 8
 | 
					#define PA_XCB_FORMAT 8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen)
 | 
					static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    const xcb_setup_t *s;
 | 
					    const xcb_setup_t *s;
 | 
				
			||||||
    xcb_screen_iterator_t iter;
 | 
					    xcb_screen_iterator_t iter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,28 +47,24 @@ static int compare_group(const struct group *a, const struct group *b) {
 | 
				
			||||||
    char **amem, **bmem;
 | 
					    char **amem, **bmem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (strcmp(a->gr_name, b->gr_name)) {
 | 
					    if (strcmp(a->gr_name, b->gr_name)) {
 | 
				
			||||||
        fprintf(stderr, "Group name mismatch: [%s] [%s]\n",
 | 
					        fprintf(stderr, "Group name mismatch: [%s] [%s]\n", a->gr_name, b->gr_name);
 | 
				
			||||||
                a->gr_name, b->gr_name);
 | 
					 | 
				
			||||||
        return 1;
 | 
					        return 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (strcmp(a->gr_passwd, b->gr_passwd)) {
 | 
					    if (strcmp(a->gr_passwd, b->gr_passwd)) {
 | 
				
			||||||
        fprintf(stderr, "Group password mismatch: [%s] [%s]\n",
 | 
					        fprintf(stderr, "Group password mismatch: [%s] [%s]\n", a->gr_passwd, b->gr_passwd);
 | 
				
			||||||
                a->gr_passwd, b->gr_passwd);
 | 
					 | 
				
			||||||
        return 1;
 | 
					        return 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (a->gr_gid != b->gr_gid) {
 | 
					    if (a->gr_gid != b->gr_gid) {
 | 
				
			||||||
        fprintf(stderr, "Gid mismatch: [%lu] [%lu]\n",
 | 
					        fprintf(stderr, "Gid mismatch: [%lu] [%lu]\n", (unsigned long) a->gr_gid, (unsigned long) b->gr_gid);
 | 
				
			||||||
                (unsigned long) a->gr_gid, (unsigned long) b->gr_gid);
 | 
					 | 
				
			||||||
        return 1;
 | 
					        return 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* XXX: Assuming the group ordering is identical. */
 | 
					    /* XXX: Assuming the group ordering is identical. */
 | 
				
			||||||
    for (amem = a->gr_mem, bmem = b->gr_mem; *amem && *bmem; ++amem, ++bmem) {
 | 
					    for (amem = a->gr_mem, bmem = b->gr_mem; *amem && *bmem; ++amem, ++bmem) {
 | 
				
			||||||
        if (strcmp(*amem, *bmem)) {
 | 
					        if (strcmp(*amem, *bmem)) {
 | 
				
			||||||
            fprintf(stderr, "Group member mismatch: [%s] [%s]\n",
 | 
					            fprintf(stderr, "Group member mismatch: [%s] [%s]\n", *amem, *bmem);
 | 
				
			||||||
                    *amem, *bmem);
 | 
					 | 
				
			||||||
            return 1;
 | 
					            return 1;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -93,14 +89,12 @@ static int compare_passwd(const struct passwd *a, const struct passwd *b) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (a->pw_uid != b->pw_uid) {
 | 
					    if (a->pw_uid != b->pw_uid) {
 | 
				
			||||||
        fprintf(stderr, "pw_uid mismatch: [%lu] [%lu]\n",
 | 
					        fprintf(stderr, "pw_uid mismatch: [%lu] [%lu]\n", (unsigned long) a->pw_uid, (unsigned long) b->pw_uid);
 | 
				
			||||||
		(unsigned long) a->pw_uid, (unsigned long) b->pw_uid);
 | 
					 | 
				
			||||||
        return 1;
 | 
					        return 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (a->pw_gid != b->pw_gid) {
 | 
					    if (a->pw_gid != b->pw_gid) {
 | 
				
			||||||
        fprintf(stderr, "pw_gid mismatch: [%lu] [%lu]\n",
 | 
					        fprintf(stderr, "pw_gid mismatch: [%lu] [%lu]\n", (unsigned long) a->pw_gid, (unsigned long) b->pw_gid);
 | 
				
			||||||
		(unsigned long) a->pw_gid, (unsigned long) b->pw_gid);
 | 
					 | 
				
			||||||
        return 1;
 | 
					        return 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,7 +44,6 @@
 | 
				
			||||||
#include <pulsecore/pid.h>
 | 
					#include <pulsecore/pid.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(int argc, char*argv[]) {
 | 
					int main(int argc, char*argv[]) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    pid_t pid;
 | 
					    pid_t pid;
 | 
				
			||||||
    int fd = -1;
 | 
					    int fd = -1;
 | 
				
			||||||
    int ret = 1, i;
 | 
					    int ret = 1, i;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue