{"id":809774,"url":"http://patchwork.ozlabs.org/api/patches/809774/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/patch/20170904173203.A176E439942E3@oldenburg.str.redhat.com/","project":{"id":41,"url":"http://patchwork.ozlabs.org/api/projects/41/?format=json","name":"GNU C Library","link_name":"glibc","list_id":"libc-alpha.sourceware.org","list_email":"libc-alpha@sourceware.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170904173203.A176E439942E3@oldenburg.str.redhat.com>","list_archive_url":null,"date":"2017-09-04T17:32:03","name":"support_format_hostent: Add more error information for NETDB_INTERNAL","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"2ae4bedfbac23128ad1c89d6a6c0d928347b35a1","submitter":{"id":14312,"url":"http://patchwork.ozlabs.org/api/people/14312/?format=json","name":"Florian Weimer","email":"fweimer@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/glibc/patch/20170904173203.A176E439942E3@oldenburg.str.redhat.com/mbox/","series":[{"id":1429,"url":"http://patchwork.ozlabs.org/api/series/1429/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/list/?series=1429","date":"2017-09-04T17:32:03","name":"support_format_hostent: Add more error information for NETDB_INTERNAL","version":1,"mbox":"http://patchwork.ozlabs.org/series/1429/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/809774/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/809774/checks/","tags":{},"related":[],"headers":{"Return-Path":"<libc-alpha-return-84174-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84174-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"RPr5Wkkv\"; dkim-atps=neutral","sourceware.org; auth=none","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=fweimer@redhat.com"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmH3P3vPQz9t32\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 03:32:17 +1000 (AEST)","(qmail 31103 invoked by alias); 4 Sep 2017 17:32:10 -0000","(qmail 30899 invoked by uid 89); 4 Sep 2017 17:32:10 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:to:subject:mime-version:content-type\n\t:content-transfer-encoding:message-id:from; q=dns; s=default; b=\n\tVTnwxxvanJuqipiSyI1w8m2USbB4rb6qnJ7hxA1d0th0HiPZY7z94ibt8nxHCueB\n\t+zgaC5pg8xmqWqr3Na2wmvIxJSVjmIjUNV9AuEZtS43ouyVnZEfJML9u5JHoZqqI\n\tDSEl8XQVoSqmW0wS+MynVhWSewdqtAB5J/kinxKfpY0=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:to:subject:mime-version:content-type\n\t:content-transfer-encoding:message-id:from; s=default; bh=u9dsIK\n\tAqc5AsyI2creUzSNAagSQ=; b=RPr5WkkvkILPl65nP0YqopWbeEDsg7DxubxgDV\n\tVk6UuarHS5ljaIiCW5lFXwRVdoY8dGqYELiHn2BidowKgoZB3gVHSq4OO/mZ31a7\n\tR5mLAqp0fvezgziWDAMVeYmiheXrbdA71gc5FKlH0B+iPXlcLzQhwmn69JUKVmlt\n\t6mkMo=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=","X-HELO":"mx1.redhat.com","DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com A25DC7487E","Date":"Mon, 04 Sep 2017 19:32:03 +0200","To":"libc-alpha@sourceware.org","Subject":"[PATCH] support_format_hostent: Add more error information for\n\tNETDB_INTERNAL","User-Agent":"Heirloom mailx 12.5 7/5/10","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Transfer-Encoding":"7bit","Message-Id":"<20170904173203.A176E439942E3@oldenburg.str.redhat.com>","From":"fweimer@redhat.com (Florian Weimer)"},"content":"2017-09-04  Florian Weimer  <fweimer@redhat.com>\n\n\t* support/support_format_hostent.c (support_format_hostent): Add\n\tmore error information for NETDB_INTERNAL.","diff":"diff --git a/support/support_format_hostent.c b/support/support_format_hostent.c\nindex 5b5f26082e..88c85ec1f1 100644\n--- a/support/support_format_hostent.c\n+++ b/support/support_format_hostent.c\n@@ -19,6 +19,7 @@\n #include <support/format_nss.h>\n \n #include <arpa/inet.h>\n+#include <errno.h>\n #include <stdio.h>\n #include <support/support.h>\n #include <support/xmemstream.h>\n@@ -41,10 +42,15 @@ support_format_hostent (struct hostent *h)\n {\n   if (h == NULL)\n     {\n-      char *value = support_format_herrno (h_errno);\n-      char *result = xasprintf (\"error: %s\\n\", value);\n-      free (value);\n-      return result;\n+      if (h_errno == NETDB_INTERNAL)\n+        return xasprintf (\"error: NETDB_INTERNAL (errno %d, %m)\\n\", errno);\n+      else\n+        {\n+          char *value = support_format_herrno (h_errno);\n+          char *result = xasprintf (\"error: %s\\n\", value);\n+          free (value);\n+          return result;\n+        }\n     }\n \n   struct xmemstream mem;\n","prefixes":[]}