From 5a19c8657cd5a93c80f23d952e411e20517edd42 Mon Sep 17 00:00:00 2001 From: Steven Luo Date: Mon, 14 Dec 2009 22:43:23 -0800 Subject: [PATCH 1/1] Be more consistent with debug printf()s for the launcher functions --- launcher.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/launcher.c b/launcher.c index 3ea9f80..6f25a28 100644 --- a/launcher.c +++ b/launcher.c @@ -84,6 +84,8 @@ void launch_microb(struct swb_context *ctx, char *uri) { if (!uri) uri = "new_window"; + printf("launch_microb with uri '%s'\n", uri); + /* Launch browserd if it's not running */ status = system("pidof /usr/sbin/browserd > /dev/null"); if (WIFEXITED(status) && WEXITSTATUS(status)) { @@ -135,8 +137,10 @@ static void launch_other_browser(struct swb_context *ctx, char *uri) { if (!uri || !strcmp(uri, "new_window")) uri = ""; - urilen = strlen(uri); - if (urilen > 0) { + + printf("launch_other_browser with uri '%s'\n", uri); + + if ((urilen = strlen(uri)) > 0) { /* Quote the URI to prevent the shell from interpreting it */ /* urilen+3 = length of URI + 2x \' + \0 */ if (!(quoted_uri = calloc(urilen+3, sizeof(char)))) -- 1.7.9.5