Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2018 23:54:46 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r482800 - in head/net-im/jabberd: . files
Message-ID:  <201810222354.w9MNskbF006643@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Mon Oct 22 23:54:46 2018
New Revision: 482800
URL: https://svnweb.freebsd.org/changeset/ports/482800

Log:
  net-im/jabberd: fix build errors with MariaDB 10.2
  
  PR:		228382
  Submitted by:	Fabian Wenk <fabian@wenks.ch>

Modified:
  head/net-im/jabberd/Makefile
  head/net-im/jabberd/files/patch-storage__authreg_mysql.c

Modified: head/net-im/jabberd/Makefile
==============================================================================
--- head/net-im/jabberd/Makefile	Mon Oct 22 23:54:10 2018	(r482799)
+++ head/net-im/jabberd/Makefile	Mon Oct 22 23:54:46 2018	(r482800)
@@ -3,7 +3,7 @@
 
 PORTNAME=	jabberd
 PORTVERSION=	2.6.1
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	net-im
 MASTER_SITES=	https://github.com/jabberd2/jabberd2/releases/download/${PORTNAME}-${DISTVERSION}/ \
 		LOCAL/matthew/${PORTNAME}

Modified: head/net-im/jabberd/files/patch-storage__authreg_mysql.c
==============================================================================
--- head/net-im/jabberd/files/patch-storage__authreg_mysql.c	Mon Oct 22 23:54:10 2018	(r482799)
+++ head/net-im/jabberd/files/patch-storage__authreg_mysql.c	Mon Oct 22 23:54:46 2018	(r482800)
@@ -1,11 +1,29 @@
---- storage/authreg_mysql.c.orig	2016-05-22 15:52:07 UTC
+--- storage/authreg_mysql.c.orig	2018-10-22 23:49:34 UTC
 +++ storage/authreg_mysql.c
-@@ -20,6 +20,8 @@
+@@ -489,6 +489,8 @@ DLLEXPORT int ar_init(authreg_t ar) {
+     MYSQL *conn;
+     mysqlcontext_t mysqlcontext;
+     int fail = 0;
++    /* enable reconnect */
++    my_bool reconnect= 1;
  
- /* this module talks to a MySQL server via libmysqlclient */
+     /* configure the database context with field names and SQL statements */
+     mysqlcontext = (mysqlcontext_t) malloc( sizeof( struct mysqlcontext_st ) );
+@@ -620,6 +622,7 @@ DLLEXPORT int ar_init(authreg_t ar) {
  
-+#include <stdio.h>
-+
- #define _XOPEN_SOURCE 500
- #include "c2s.h"
- #include <mysql.h>
+     mysql_options(conn, MYSQL_READ_DEFAULT_GROUP, "jabberd");
+     mysql_options(conn, MYSQL_SET_CHARSET_NAME, "utf8");
++    mysql_options(conn, MYSQL_OPT_RECONNECT, (void *)&reconnect);
+ 
+     /* connect with CLIENT_INTERACTIVE to get a (possibly) higher timeout value than default */
+     if(mysql_real_connect(conn, host, user, pass, dbname, atoi(port), NULL, CLIENT_INTERACTIVE) == NULL) {
+@@ -628,9 +631,6 @@ DLLEXPORT int ar_init(authreg_t ar) {
+     }
+ 
+     mysql_query(conn, "SET NAMES 'utf8'");
+-
+-    /* Set reconnect flag to 1 (set to 0 by default from mysql 5 on) */
+-    conn->reconnect = 1;
+ 
+     ar->user_exists = _ar_mysql_user_exists;
+     if (MPC_PLAIN == mysqlcontext->password_type) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810222354.w9MNskbF006643>