hal/hald hald_runner.c,1.4,1.5 property.c,1.16,1.17
David Zeuthen
david at freedesktop.org
Sat Jan 21 11:08:29 PST 2006
Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv6561/hald
Modified Files:
hald_runner.c property.c
Log Message:
2006-01-21 David Zeuthen <davidz at redhat.com>
* hald/property.c (hal_property_to_string): Ugh, make this work on
empty strlists otherwise we return corrupt data and may crash the
runner via D-BUS since we pass non-UTF-8 over D-BUS.
* hald/hald_runner.c (hald_runner_start_runner): Print pid of runner
and make space for passing DBUS_VERBOSE=1 in the environment (right
now commented out)
Index: hald_runner.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald_runner.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hald_runner.c 21 Jan 2006 16:54:04 -0000 1.4
+++ hald_runner.c 21 Jan 2006 19:08:27 -0000 1.5
@@ -77,7 +77,7 @@
GError *error = NULL;
GPid pid;
char *argv[] = { NULL, NULL};
- char *env[] = { NULL, NULL, NULL};
+ char *env[] = { NULL, NULL, NULL, NULL};
const char *hald_runner_path;
dbus_error_init(&err);
@@ -99,6 +99,8 @@
} else {
env[1] = g_strdup_printf ("PATH=" PACKAGE_LIBEXEC_DIR ":" PACKAGE_SCRIPT_DIR);
}
+
+ /*env[2] = "DBUS_VERBOSE=1";*/
if (!g_spawn_async(NULL, argv, env, G_SPAWN_DO_NOT_REAP_CHILD|G_SPAWN_SEARCH_PATH,
@@ -110,6 +112,8 @@
g_free(env[0]);
g_free(env[1]);
+ HAL_INFO (("Runner has pid %d", pid));
+
g_child_watch_add(pid, runner_died, NULL);
while (runner_connection == NULL) {
/* Wait for the runner */
@@ -145,7 +149,7 @@
env = g_strdup_printf ("HAL_PROP_%s=%s", prop_upper, value);
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &env);
- g_free(env);
+ g_free (env);
g_free (value);
g_free (prop_upper);
Index: property.c
===================================================================
RCS file: /cvs/hal/hal/hald/property.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- property.c 21 Jan 2006 06:36:51 -0000 1.16
+++ property.c 21 Jan 2006 19:08:27 -0000 1.17
@@ -229,6 +229,7 @@
char buf[256];
i = 0;
+ buf[0] = '\0';
for (iter = hal_property_get_strlist (prop);
iter != NULL && i < sizeof(buf);
iter = g_slist_next (iter)) {
More information about the hal-commit
mailing list