aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-07 23:33:46 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-07 23:33:46 +0000
commitde58cf01e32276f7123533c76f8646b7a7776934 (patch)
treeb974463d0ca9bcaf7f5a7cb4c9c52d06f68ffa73
parent5394da260d2b8a22a4c3aa06bef0c8e866152551 (diff)
downloadgnunet-gtk-de58cf01e32276f7123533c76f8646b7a7776934.tar.gz
gnunet-gtk-de58cf01e32276f7123533c76f8646b7a7776934.zip
-fix error handling logic
-rw-r--r--src/namestore/plugin_gtk_namestore_tlsa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/namestore/plugin_gtk_namestore_tlsa.c b/src/namestore/plugin_gtk_namestore_tlsa.c
index d8dc60cd..191c785e 100644
--- a/src/namestore/plugin_gtk_namestore_tlsa.c
+++ b/src/namestore/plugin_gtk_namestore_tlsa.c
@@ -820,12 +820,14 @@ import_address_cb (void *cls,
820 _("Failed to connect to target address `%s': %s\n"), 820 _("Failed to connect to target address `%s': %s\n"),
821 GNUNET_a2s (addr, addrlen), 821 GNUNET_a2s (addr, addrlen),
822 STRERROR (errno)); 822 STRERROR (errno));
823 goto cleanup; 823 GNUNET_NETWORK_socket_close (ic->sock);
824 return;
824 } 825 }
825 826
826 GNUNET_RESOLVER_request_cancel (ic->rh); 827 GNUNET_RESOLVER_request_cancel (ic->rh);
827 828
828 /* Use default priorities */ 829 /* Use default priorities */
830 gnutls_certificate_allocate_credentials (&xcred);
829 if (GNUTLS_E_SUCCESS != 831 if (GNUTLS_E_SUCCESS !=
830 (ret = gnutls_priority_set_direct (ic->session, 832 (ret = gnutls_priority_set_direct (ic->session,
831 "PERFORMANCE", 833 "PERFORMANCE",
@@ -837,7 +839,6 @@ import_address_cb (void *cls,
837 goto cleanup; 839 goto cleanup;
838 } 840 }
839 /* put the x509 credentials to the current session */ 841 /* put the x509 credentials to the current session */
840 gnutls_certificate_allocate_credentials (&xcred);
841 gnutls_credentials_set (ic->session, 842 gnutls_credentials_set (ic->session,
842 GNUTLS_CRD_CERTIFICATE, 843 GNUTLS_CRD_CERTIFICATE,
843 xcred); 844 xcred);