Skip to content

Commit

Permalink
scanner: ignore invalid state for intermediate variables
Browse files Browse the repository at this point in the history
  • Loading branch information
LBCrion committed Dec 13, 2024
1 parent 5e68a41 commit 14c4e52
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
4 changes: 4 additions & 0 deletions modules/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ static void net_update_essid ( gchar *interface )
gint sock;
gchar lessid[IW_ESSID_MAX_SIZE+1];
iface_info *iface;
gboolean diff;

if(!interface)
return;
Expand All @@ -194,10 +195,13 @@ static void net_update_essid ( gchar *interface )
sock = socket(AF_INET, SOCK_DGRAM, 0);
if(sock >= 0 && ioctl(sock, SIOCGIWESSID, &wreq) >= 0)
{
diff = g_strcmp0(iface->essid, lessid);
g_mutex_lock(&iface->mutex);
g_free(iface->essid);
iface->essid = g_strdup(lessid);
g_mutex_unlock(&iface->mutex);
if(diff)
trigger_emit("network");
}
if(sock >= 0)
close(sock);
Expand Down
19 changes: 0 additions & 19 deletions src/gui/basewidget.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,25 +494,6 @@ void base_widget_set_tooltip ( GtkWidget *self, guint8 *code, gsize len )
G_CALLBACK(base_widget_tooltip_update), self);
}

/*void base_widget_set_value ( GtkWidget *self, gchar *value )
{
BaseWidgetPrivate *priv;
g_return_if_fail(IS_BASE_WIDGET(self));
priv = base_widget_get_instance_private(BASE_WIDGET(self));
expr_cache_set(priv->value, value);
priv->value->widget = self;
if(expr_cache_eval(priv->value) || priv->always_update)
base_widget_update_value(self);
g_mutex_lock(&widget_mutex);
if(!g_list_find(widgets_scan,self))
widgets_scan = g_list_append(widgets_scan,self);
g_mutex_unlock(&widget_mutex);
}*/

void base_widget_set_value ( GtkWidget *self, guint8 *code, gsize len )
{
BaseWidgetPrivate *priv;
Expand Down
2 changes: 1 addition & 1 deletion src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ ScanVar *scanner_var_update ( gchar *name, gboolean update, expr_cache_t *expr )
if(!var)
return NULL;

if(!update || !var->invalid)
if(!update || (!var->invalid && var->type != G_TOKEN_SET))
{
if(expr)
expr->vstate = expr->vstate || var->vstate;
Expand Down

0 comments on commit 14c4e52

Please sign in to comment.