Force continuous_mode on on Fremantle
authorSteven Luo <steven+maemo@steven676.net>
Thu, 26 Aug 2010 01:10:48 +0000 (18:10 -0700)
committerSteven Luo <steven+maemo@steven676.net>
Thu, 26 Aug 2010 12:03:06 +0000 (05:03 -0700)
For Fremantle, we have to have continuous_mode on in order to keep
listening to the D-Bus system bus like MicroB does.  Since several
applications appear to depend on this behavior, force continuous_mode
on for Fremantle and emit a warning if the config file has it turned
off.

main.c

diff --git a/main.c b/main.c
index 40823e3..568732d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -49,7 +49,14 @@ static void read_config(int signalnum) {
        swb_config_load(&cfg);
 
        log_config(cfg.logging);
        swb_config_load(&cfg);
 
        log_config(cfg.logging);
+#ifdef FREMANTLE
+       /* continuous mode is required on Fremantle */
+       ctx.continuous_mode = 1;
+       if (!cfg.continuous_mode)
+               log_msg("WARNING: continuous_mode = 0 operation no longer supported, ignoring config setting");
+#else
        ctx.continuous_mode = cfg.continuous_mode;
        ctx.continuous_mode = cfg.continuous_mode;
+#endif
        free(ctx.other_browser_cmd);
        if (cfg.other_browser_cmd) {
                if (!(ctx.other_browser_cmd = strdup(cfg.other_browser_cmd))) {
        free(ctx.other_browser_cmd);
        if (cfg.other_browser_cmd) {
                if (!(ctx.other_browser_cmd = strdup(cfg.other_browser_cmd))) {