Esempio n. 1
0
File: main.c Progetto: Tilka/ncdc
static void open_autoconnect() {
  char **hubs = db_vars_hubs();
  char **hub;
  // TODO: make sure the tabs are opened in the same order as they were in the last run?
  for(hub=hubs; *hub; hub++)
    if(var_get_bool(db_vars_hubid(*hub), VAR_autoconnect))
      ui_tab_open(uit_hub_create(*hub+1, TRUE), FALSE, NULL);
  listen_refresh();
  g_strfreev(hubs);
}
Esempio n. 2
0
File: vars.c Progetto: srijan/ncdc
static gboolean s_tls_policy(guint64 hub, const char *key, const char *val, GError **err) {
  if(!db_certificate) {
    g_set_error(err, 1, 0, "This option can't be modified: %s.", !have_tls_support ? "no TLS support available" : "no client certificate available");
    return FALSE;
  }
  char *r = flags_fmt(var_tls_policy_ops, int_raw(val));
  db_vars_set(hub, key, r[0] ? r : NULL);
  g_free(r);
  listen_refresh();
  hub_global_nfochange();
  return TRUE;
}
Esempio n. 3
0
File: vars.c Progetto: srijan/ncdc
static gboolean s_active_conf(guint64 hub, const char *key, const char *val, GError **err) {
  db_vars_set(hub, key, val);
  listen_refresh();
  hub_global_nfochange();
  return TRUE;
}