isdnlog-4.61:
- Support for mysql-4.0alpha -- many thanks to Jochen Erwied (jochen@erwied.de)!
This commit is contained in:
parent
a6a83894f8
commit
2e3804d65d
|
@ -1,4 +1,4 @@
|
|||
## $Id: Makefile.in,v 1.204 2002/07/25 18:16:05 akool Exp $
|
||||
## $Id: Makefile.in,v 1.205 2002/07/26 22:14:19 akool Exp $
|
||||
##
|
||||
## ISDN accounting for isdn4linux.
|
||||
##
|
||||
|
@ -19,6 +19,10 @@
|
|||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Log: Makefile.in,v $
|
||||
## Revision 1.205 2002/07/26 22:14:19 akool
|
||||
## isdnlog-4.61:
|
||||
## - Support for mysql-4.0alpha -- many thanks to Jochen Erwied (jochen@erwied.de)!
|
||||
##
|
||||
## Revision 1.204 2002/07/25 18:16:05 akool
|
||||
## isdnlog-2.60:
|
||||
## - new provider "01081" (1,5 EuroCent/minute)
|
||||
|
@ -1544,7 +1548,7 @@ SERVICEFILE = /etc/services
|
|||
# DON'T EDIT BELOW THIS LINE
|
||||
######################################################################
|
||||
|
||||
VERSION = 4.60
|
||||
VERSION = 4.61
|
||||
|
||||
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
|
||||
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mysqldb.c,v 1.2 2000/04/02 17:35:07 akool Exp $
|
||||
/* $Id: mysqldb.c,v 1.3 2002/07/26 22:14:19 akool Exp $
|
||||
*
|
||||
* Interface for mySQL-Database for isdn4linux. (db-module)
|
||||
*
|
||||
|
@ -20,6 +20,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: mysqldb.c,v $
|
||||
* Revision 1.3 2002/07/26 22:14:19 akool
|
||||
* isdnlog-4.61:
|
||||
* - Support for mysql-4.0alpha -- many thanks to Jochen Erwied (jochen@erwied.de)!
|
||||
*
|
||||
* Revision 1.2 2000/04/02 17:35:07 akool
|
||||
* isdnlog-4.18
|
||||
* - isdnlog/isdnlog/isdnlog.8.in ... documented hup3
|
||||
|
@ -88,6 +92,22 @@ int mysql_dbOpen(void)
|
|||
|
||||
/* make a connection to the database daemon */
|
||||
|
||||
#if MYSQL_VERSION_ID > 40000
|
||||
if (!(mysql_init(&mysql)))
|
||||
{
|
||||
syslog( LOG_ERR, "%s", "Init of mySQL failed.");
|
||||
syslog( LOG_ERR, "%s", mysql_error( &mysql ));
|
||||
return -1;
|
||||
}
|
||||
if (!(mysql_real_connect(&mysql, mysql_db_Host, mysql_db_User,
|
||||
mysql_db_Passwd, mysql_db_Name, 0, NULL, 0)))
|
||||
{
|
||||
syslog( LOG_ERR, "%s", "Connection to mySQL failed.");
|
||||
syslog( LOG_ERR, "%s", mysql_error( &mysql ));
|
||||
return -1;
|
||||
}
|
||||
|
||||
#else
|
||||
if (!(mysql_connect(&mysql, mysql_db_Host, mysql_db_User, mysql_db_Passwd)))
|
||||
{
|
||||
syslog( LOG_ERR, "%s", "Connection to mySQL failed.");
|
||||
|
@ -103,6 +123,7 @@ int mysql_dbOpen(void)
|
|||
syslog( LOG_ERR, "%s", mysql_error( &mysql ));
|
||||
return( -1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return( 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue