freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Paul Andrews <andrewsp AT andronics.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] Segmentation fault on dbinit()
- Date: Thu, 25 Oct 2007 13:42:01 +0100
Hi All.
Getting a segmentation fault on dbinit().
Platform: Suse 10.2 / 10.3 using rpm's from OpenSuse.org
Tsql works fine.
Using GDB, it looks like fopen on the locales.conf file in
tds_get_locale is failing.
int db_connect(int nDbType, char acServer[], char acUsername[], char
acPassword[], char acAppName[], char acDatabase[], char acFreeTdsDbName[])
{
printf("\nServer: %s\n",acServer);
printf("\nUsername: %s\n",acUsername);
printf("\nPassword: %s\n", acPassword);
printf("\nAppName: %s\n", acAppName);
printf("\nDatabase: %s\n", acDatabase);
printf("\nDbName: %s\n", acFreeTdsDbName);
//dberrhandle((EHANDLEFUNC)dberr_handler);
//dbmsghandle((MHANDLEFUNC)dbmsg_handler);
if ( dbinit() == FAIL ) ==> Segmentation Fault here
printf("\nFail\n");
else
printf("\nSuccess\n");
printf("\nbefore\n");
if ( dblogin() == FAIL)
{
printf("\ndblogin() FAIL\n");
}
else
{
login = dblogin();
printf("\nLogin ok\n");
}
DBSETLUSER(login, acUsername);
DBSETLPWD(login, acPassword);
DBSETLHOST(login, acServer);
DBSETLAPP(login, acAppName);
printf("\nafter\n");
/*if ( dbopen(login, acFreeTdsDbName) == NULL )
{
return -1;
}*/
if ( dbopen(login, acFreeTdsDbName) == NULL )
{
printf("\nDBOpen() Error\n");
}
else
{
dbconn = dbopen(login, acFreeTdsDbName);
//return 0;
}
printf("\nafter 1\n");
if(dbuse(dbconn, acDatabase) == FAIL)
return -1;
printf("\nafter 2\n");
return 0;
}
Any and all help appreciated.
Paul.
-
[freetds] Segmentation fault on dbinit(),
Paul Andrews, 10/25/2007
-
Re: [freetds] Segmentation fault on dbinit(),
entropy, 10/25/2007
-
Re: [freetds] Segmentation fault on dbinit(),
Paul Andrews, 10/25/2007
- Re: [freetds] Segmentation fault on dbinit(), James K. Lowden, 10/25/2007
-
Re: [freetds] Segmentation fault on dbinit(),
Paul Andrews, 10/25/2007
- <Possible follow-up(s)>
-
Re: [freetds] Segmentation fault on dbinit(),
Paul Andrews, 10/25/2007
-
Re: [freetds] Segmentation fault on dbinit(),
James K. Lowden, 10/25/2007
- Re: [freetds] Segmentation fault on dbinit(), Paul Andrews, 10/25/2007
-
Re: [freetds] Segmentation fault on dbinit(),
Paul Andrews, 10/26/2007
-
Re: [freetds] Segmentation fault on dbinit(),
Paul Andrews, 10/26/2007
-
Re: [freetds] Segmentation fault on dbinit(),
Konrad J Hambrick, 10/26/2007
- Re: [freetds] Segmentation fault on dbinit(), Paul Andrews, 10/26/2007
-
Re: [freetds] Segmentation fault on dbinit(),
Konrad J Hambrick, 10/26/2007
-
Re: [freetds] Segmentation fault on dbinit(),
Paul Andrews, 10/26/2007
-
Re: [freetds] Segmentation fault on dbinit(),
James K. Lowden, 10/25/2007
-
Re: [freetds] Segmentation fault on dbinit(),
entropy, 10/25/2007
Archive powered by MHonArc 2.6.24.