Changed error messages to use debug library.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@972 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2004-03-17 10:26:32 +00:00
parent 1a87d79b78
commit 425d5827d3
1 changed files with 3 additions and 3 deletions

View File

@ -28,17 +28,17 @@ void zmDbConnect( const char *user, const char*pass )
{
if ( !mysql_init( &dbconn ) )
{
fprintf( stderr, "Can't initialise structure: %s\n", mysql_error( &dbconn ) );
Error(( "Can't initialise structure: %s", mysql_error( &dbconn ) ));
exit( mysql_errno( &dbconn ) );
}
if ( !mysql_real_connect( &dbconn, ZM_DB_SERVER, user, pass, 0, 0, 0, 0 ) )
{
fprintf( stderr, "Can't connect to server: %s\n", mysql_error( &dbconn ) );
Error(( "Can't connect to server: %s", mysql_error( &dbconn ) ));
exit( mysql_errno( &dbconn ) );
}
if ( mysql_select_db( &dbconn, ZM_DB_NAME ) )
{
fprintf( stderr, "Can't select database: %s\n", mysql_error( &dbconn ) );
Error(( "Can't select database: %s", mysql_error( &dbconn ) ));
exit( mysql_errno( &dbconn ) );
}
}