summaryrefslogtreecommitdiff
path: root/net/inadyn/patches
diff options
context:
space:
mode:
authorabs <abs>2015-08-14 20:24:27 +0000
committerabs <abs>2015-08-14 20:24:27 +0000
commit3a28df0ece0095310365f13cf5500ed56ea8cc3d (patch)
tree3ce6d52eb7f72b1ac61b64d9a35d2a8ad56ac2e6 /net/inadyn/patches
parentc2b70999fd7fdf473ab91ff6f717909acf96705a (diff)
downloadpkgsrc-3a28df0ece0095310365f13cf5500ed56ea8cc3d.tar.gz
If the update call fails, log the response from the remote service
bump PKGREVISION
Diffstat (limited to 'net/inadyn/patches')
-rw-r--r--net/inadyn/patches/patch-plugins_freedns.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/net/inadyn/patches/patch-plugins_freedns.c b/net/inadyn/patches/patch-plugins_freedns.c
new file mode 100644
index 00000000000..520c223d3a2
--- /dev/null
+++ b/net/inadyn/patches/patch-plugins_freedns.c
@@ -0,0 +1,39 @@
+$NetBSD: patch-plugins_freedns.c,v 1.1 2015/08/14 20:24:28 abs Exp $
+
+If the update call fails, log the response from the remote service
+
+--- plugins/freedns.c.orig 2015-07-14 15:29:28.000000000 +0000
++++ plugins/freedns.c
+@@ -55,7 +55,7 @@ static int request(ddns_t *ctx, ddns_inf
+ int i, rc = 0;
+ http_t client;
+ http_trans_t trans;
+- char *buf, *tmp, *line, *hash = NULL;
++ char *buf, *tmp, *line, *hash = NULL, *errmsg = NULL;
+ char host[256], updateurl[256];
+ char buffer[256];
+ char digeststr[SHA1_DIGEST_BYTES * 2 + 1];
+@@ -109,15 +109,20 @@ static int request(ddns_t *ctx, ddns_inf
+ }
+ free(buf);
+
+- if (!hash)
++ if (!hash) {
++ errmsg = trans.p_rsp_body;
+ rc = RC_DYNDNS_RSP_NOTOK;
+- else
++ } else
+ hash++;
+ }
+ while (0);
+
+ if (rc) {
+- logit(LOG_INFO, "Update URL query failed");
++ if (errmsg != NULL) {
++ logit(LOG_INFO, "Update URL query failed (%s)", errmsg);
++ } else {
++ logit(LOG_INFO, "Update URL query failed");
++ }
+ return 0;
+ }
+