Hi, What is a PFEA#?
FEA#4810 doesn't seem right: https://bugs.meego.com/show_bug.cgi?id=4810 /Carsten 2011/5/3 Ziv Chang <[email protected]>: > Hi, > I have made the following changes to pulseaudio-policy-enforcement in project > devel:resourcepolicy. Please review and accept ASAP. > > Thank You, > Ziv Chang > > [This message was auto-generated] > > --- > > Request #17429: > > submit: > home:zivchang:branches:devel:resourcepolicy/pulseaudio-policy-enforcement(r2)(cleanup) > -> devel:resourcepolicy/pulseaudio-policy-enforcement > > > Message: > * Tue May 3 2011 Ziv Chang <[email protected]> - 1.1.10 > - Add new args property for the clients. The enforcement-point can leverage > this property for identification the group of meego app if they are all be > launched by the same launcher(ex: meego-qml-launcher), PFEA#4810 > > State: new 2011-05-03T02:39:00 zivchang > Comment: None > > > > changes files: > -------------- > --- pulseaudio-policy-enforcement.changes > +++ pulseaudio-policy-enforcement.changes > @@ -0,0 +1,3 @@ > +* Tue May 3 2011 Ziv Chang <[email protected]> - 1.1.10 > +- Add new args property for the clients. The enforcement-point can leverage > this property for identification the group of meego app if they are all be > launched by the same launcher(ex: meego-qml-launcher), PFEA#4810 > + > > new: > ---- > add_args_property.patch > > spec files: > ----------- > --- pulseaudio-policy-enforcement.spec > +++ pulseaudio-policy-enforcement.spec > @@ -15,6 +15,7 @@ > Source0: %{name}-%{version}.tar.gz > Source100: pulseaudio-policy-enforcement.yaml > Patch0: support_multiple_audio_output.patch > +Patch1: add_args_property.patch > BuildRequires: pkgconfig(pulsecore) > BuildRequires: pkgconfig(libpulse) > BuildRequires: pkgconfig(dbus-1) > @@ -34,6 +35,7 @@ > > # support_multiple_audio_output.patch > %patch0 -p1 > +%patch1 -p1 > # >> setup > # << setup > > > other changes: > -------------- > > ++++++ add_args_property.patch (new) > --- add_args_property.patch > +++ add_args_property.patch > +diff -ruN pulseaudio-policy-enforcement-1.1.10orig/src/client-ext.c > pulseaudio-policy-enforcement-1.1.10/src/client-ext.c > +--- pulseaudio-policy-enforcement-1.1.10orig/src/client-ext.c 2010-12-02 > 09:18:39.000000000 +0200 > ++++ pulseaudio-policy-enforcement-1.1.10/src/client-ext.c 2011-05-03 > 10:17:39.278001061 +0300 > +@@ -22,6 +22,8 @@ > + > + static void client_ext_set_arg0(struct pa_client *client); > + > ++static void client_ext_set_args(struct pa_client *client); > ++ > + struct pa_client_evsubscr *pa_client_ext_subscription(struct userdata *u) > + { > + struct pa_client_evsubscr *subscr; > +@@ -149,6 +151,9 @@ > + > + args = > pa_proplist_gets(client->proplist,PA_PROP_APPLICATION_PROCESS_ARGS); > + > ++ if (args == NULL) > ++ client_ext_set_args(client); > ++ > + return (char *)args; > + } > + > +@@ -260,19 +265,24 @@ > + } > + > + > +-#if 0 > + static void client_ext_set_args(struct pa_client *client) > + { > +-#if 0 > + char path[256]; > +- char args[ARG_MAX]; > +- int argc; > +- char *argv[1024]; > ++ char args[1024]; > + int fd, len; > +- char *p, *e; > +- int i, offs; > ++ int i; > ++ pid_t pid; > ++ > ++ if (!(pid = pa_client_ext_pid(client))) { > ++ /* > ++ application.process.id property is set not for all kinds > ++ of pulseaudio clients, and not right after a client creation > ++ */ > ++ pa_log_debug("no pid property for client %u, skip it", > client->index); > ++ return; > ++ } > + > +- snprintf(path, sizeof(path), "/proc/%d/cmdline", ext->pid); > ++ snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); > + > + if ((fd = open(path, O_RDONLY)) < 0) { > + pa_log("%s: Can't obtain command line", __FILE__); > +@@ -291,29 +301,15 @@ > + > + break; > + } > +- > +- for (e = (p = args) + len, argc = 0; argc < 1024 && p < e; argc++) { > +- argv[argc] = p; > +- > +- while (*p++ && p < e) > +- ; > ++ > ++ close(fd); > ++ for(i = 0; i < len-1; i++) > ++ { > ++ if (args[i] == '\0') > ++ args[i]=' '; > + } > +- > +- p = pa_xmalloc((argc * sizeof(char *)) + len); > +- > +- memcpy(p, argv, (argc * sizeof(char *))); > +- memcpy(p + (argc * sizeof(char *)), args, len); > +- > +- ext->argc = argc; > +- ext->argv = (char **)p; > +- > +- offs = (p + (argc * sizeof(char *))) - args; > +- > +- for (i = 0; i < argc; i++) > +- ext->argv[i] += offs; > +-#endif > ++ pa_proplist_sets(client->proplist, PA_PROP_APPLICATION_PROCESS_ARGS, > args); > + } > +-#endif > + > + > + static char *client_ext_dump(struct pa_client *client, char *buf, int len) > > _______________________________________________ > MeeGo-commits mailing list > [email protected] > http://lists.meego.com/listinfo/meego-commits > _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
