File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,26 @@ add_entry_to_persist_file(gchar *entry, PersistTool *self)
137
137
return result ;
138
138
}
139
139
140
+ static void
141
+ lookup_entry (gpointer data , gpointer user_data )
142
+ {
143
+
144
+ PersistTool * self = (PersistTool * )user_data ;
145
+ gchar * name = (gchar * )data ;
146
+
147
+ gsize value_len = 0 ;
148
+ guint8 version = 0 ;
149
+ persist_state_lookup_entry (self -> state , name , & value_len , & version );
150
+ }
151
+
152
+ /* this function reads all entries in persist to update the in_use struct memeber */
153
+ static void
154
+ dump_all_entries (PersistTool * self )
155
+ {
156
+ GList * keys = persist_state_get_key_list (self -> state );
157
+ g_list_foreach (keys , lookup_entry , self );
158
+ g_list_free (keys );
159
+ }
140
160
141
161
gint
142
162
add_main (int argc , char * argv [])
@@ -193,6 +213,9 @@ add_main(int argc, char *argv[])
193
213
}
194
214
}
195
215
g_free (line );
216
+
217
+ dump_all_entries (self );
218
+
196
219
persist_tool_free (self );
197
220
if (input_file != stdin )
198
221
{
You can’t perform that action at this time.
0 commit comments