Date: Wed, 9 Oct 2019 17:45:43 +0000 (UTC) From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r514176 - in branches/2019Q4/net/asterisk13: . files Message-ID: <201910091745.x99HjhfW016791@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: madpilot Date: Wed Oct 9 17:45:43 2019 New Revision: 514176 URL: https://svnweb.freebsd.org/changeset/ports/514176 Log: MFH: r514158 r514160 Fix CDR with PostgreSQL 12 PR: 241116 Submitted by: cmt Fix typo. Approved by: ports-secteam (miwi) Added: branches/2019Q4/net/asterisk13/files/patch-cdr_cdr__pgsql.c - copied unchanged from r514158, head/net/asterisk13/files/patch-cdr_cdr__pgsql.c Modified: branches/2019Q4/net/asterisk13/Makefile Directory Properties: branches/2019Q4/ (props changed) Modified: branches/2019Q4/net/asterisk13/Makefile ============================================================================== --- branches/2019Q4/net/asterisk13/Makefile Wed Oct 9 17:41:22 2019 (r514175) +++ branches/2019Q4/net/asterisk13/Makefile Wed Oct 9 17:45:43 2019 (r514176) @@ -2,6 +2,7 @@ PORTNAME= asterisk PORTVERSION= 13.28.1 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 MASTER_SITE_SUBDIR= asterisk/ \ Copied: branches/2019Q4/net/asterisk13/files/patch-cdr_cdr__pgsql.c (from r514158, head/net/asterisk13/files/patch-cdr_cdr__pgsql.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q4/net/asterisk13/files/patch-cdr_cdr__pgsql.c Wed Oct 9 17:45:43 2019 (r514176, copy of r514158, head/net/asterisk13/files/patch-cdr_cdr__pgsql.c) @@ -0,0 +1,11 @@ +--- cdr/cdr_pgsql.c.orig 2019-10-06 21:08:37 UTC ++++ cdr/cdr_pgsql.c +@@ -707,7 +707,7 @@ static int config_module(int reload) + schemaname = ast_alloca(strlen(tmp_schemaname) * 2 + 1); + PQescapeStringConn(conn, schemaname, tmp_schemaname, strlen(tmp_schemaname), NULL); + +- snprintf(sqlcmd, sizeof(sqlcmd), "SELECT a.attname, t.typname, a.attlen, a.attnotnull, d.adsrc, a.atttypmod FROM (((pg_catalog.pg_class c INNER JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace AND c.relname = '%s' AND n.nspname = %s%s%s) INNER JOIN pg_catalog.pg_attribute a ON (NOT a.attisdropped) AND a.attnum > 0 AND a.attrelid = c.oid) INNER JOIN pg_catalog.pg_type t ON t.oid = a.atttypid) LEFT OUTER JOIN pg_attrdef d ON a.atthasdef AND d.adrelid = a.attrelid AND d.adnum = a.attnum ORDER BY n.nspname, c.relname, attnum", ++ snprintf(sqlcmd, sizeof(sqlcmd), "SELECT a.attname, t.typname, a.attlen, a.attnotnull, pg_catalog.pg_get_expr(d.adbin, d.adrelid) adsrc, a.atttypmod FROM (((pg_catalog.pg_class c INNER JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace AND c.relname = '%s' AND n.nspname = %s%s%s) INNER JOIN pg_catalog.pg_attribute a ON (NOT a.attisdropped) AND a.attnum > 0 AND a.attrelid = c.oid) INNER JOIN pg_catalog.pg_type t ON t.oid = a.atttypid) LEFT OUTER JOIN pg_attrdef d ON a.atthasdef AND d.adrelid = a.attrelid AND d.adnum = a.attnum ORDER BY n.nspname, c.relname, attnum", + tablename, + ast_strlen_zero(schemaname) ? "" : "'", ast_strlen_zero(schemaname) ? "current_schema()" : schemaname, ast_strlen_zero(schemaname) ? "" : "'"); + } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910091745.x99HjhfW016791>