diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 19:12:17 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 19:12:17 +0200 |
commit | 8c48060e129877767f58a8403deba8a4beaeea24 (patch) | |
tree | 79cbe944d851c7c7536b63641eb36cb96a87b4b5 /src/gns | |
parent | b12644f83637c2508a11927490ae0b94d8ee4095 (diff) | |
download | gnunet-8c48060e129877767f58a8403deba8a4beaeea24.tar.gz gnunet-8c48060e129877767f58a8403deba8a4beaeea24.zip |
-fix rest plugin issues
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/plugin_rest_gns.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c index a3006ce23..1d560515c 100644 --- a/src/gns/plugin_rest_gns.c +++ b/src/gns/plugin_rest_gns.c | |||
@@ -405,8 +405,6 @@ libgnunet_plugin_rest_gns_init (void *cls) | |||
405 | struct GNUNET_REST_Plugin *api; | 405 | struct GNUNET_REST_Plugin *api; |
406 | 406 | ||
407 | cfg = cls; | 407 | cfg = cls; |
408 | if (NULL != plugin.cfg) | ||
409 | return NULL; /* can only initialize once! */ | ||
410 | memset (&plugin, 0, sizeof(struct Plugin)); | 408 | memset (&plugin, 0, sizeof(struct Plugin)); |
411 | plugin.cfg = cfg; | 409 | plugin.cfg = cfg; |
412 | api = GNUNET_new (struct GNUNET_REST_Plugin); | 410 | api = GNUNET_new (struct GNUNET_REST_Plugin); |
@@ -437,12 +435,14 @@ void * | |||
437 | libgnunet_plugin_rest_gns_done (void *cls) | 435 | libgnunet_plugin_rest_gns_done (void *cls) |
438 | { | 436 | { |
439 | struct GNUNET_REST_Plugin *api = cls; | 437 | struct GNUNET_REST_Plugin *api = cls; |
440 | struct Plugin *plugin = api->cls; | 438 | struct Plugin *plugin; |
441 | 439 | ||
442 | plugin->cfg = NULL; | ||
443 | if (NULL != gns) | 440 | if (NULL != gns) |
444 | GNUNET_GNS_disconnect (gns); | 441 | GNUNET_GNS_disconnect (gns); |
445 | 442 | ||
443 | plugin = api->cls; | ||
444 | |||
445 | plugin->cfg = NULL; | ||
446 | 446 | ||
447 | GNUNET_free (allow_methods); | 447 | GNUNET_free (allow_methods); |
448 | GNUNET_free (api); | 448 | GNUNET_free (api); |