diff options
Diffstat (limited to 'apps/plugins/open_plugins.c')
-rw-r--r-- | apps/plugins/open_plugins.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/open_plugins.c b/apps/plugins/open_plugins.c index d479bbd31c..b8d11d2ae5 100644 --- a/apps/plugins/open_plugins.c +++ b/apps/plugins/open_plugins.c | |||
@@ -296,6 +296,7 @@ static uint32_t op_entry_add_path(const char *key, const char *plugin, const cha | |||
296 | { | 296 | { |
297 | int len; | 297 | int len; |
298 | uint32_t hash; | 298 | uint32_t hash; |
299 | uint32_t newhash; | ||
299 | char *pos = "";; | 300 | char *pos = "";; |
300 | int fd_tmp = -1; | 301 | int fd_tmp = -1; |
301 | use_key = (use_key == true && key != NULL); | 302 | use_key = (use_key == true && key != NULL); |
@@ -309,7 +310,8 @@ static uint32_t op_entry_add_path(const char *key, const char *plugin, const cha | |||
309 | { | 310 | { |
310 | /* need to keep the old hash so we can remove the old entry */ | 311 | /* need to keep the old hash so we can remove the old entry */ |
311 | hash = op_entry.hash; | 312 | hash = op_entry.hash; |
312 | open_plugin_get_hash(plugin, &op_entry.hash); | 313 | open_plugin_get_hash(plugin, &newhash); |
314 | op_entry.hash = newhash; | ||
313 | } | 315 | } |
314 | else | 316 | else |
315 | hash = op_entry.hash; | 317 | hash = op_entry.hash; |
@@ -352,7 +354,10 @@ static uint32_t op_entry_add_path(const char *key, const char *plugin, const cha | |||
352 | /* hash on the parameter path if it is a file */ | 354 | /* hash on the parameter path if it is a file */ |
353 | if (op_entry.lang_id <0 && key == op_entry.path && | 355 | if (op_entry.lang_id <0 && key == op_entry.path && |
354 | rb->file_exists(op_entry.param)) | 356 | rb->file_exists(op_entry.param)) |
355 | open_plugin_get_hash(op_entry.path, &op_entry.hash); | 357 | { |
358 | open_plugin_get_hash(op_entry.path, &newhash); | ||
359 | op_entry.hash = newhash; | ||
360 | } | ||
356 | } | 361 | } |
357 | 362 | ||
358 | rb->write(fd_tmp, &op_entry, op_entry_sz); /* add new entry first */ | 363 | rb->write(fd_tmp, &op_entry, op_entry_sz); /* add new entry first */ |