Hi all,
I'm still at dbtext: I have a line in ser.cfg which is now: modparam("auth_db", "db_url","dbtext:///usr/local/etc/ser/dbtext") where I have a file produced with the script from cesc called "subscriber".
Given by DEBUG-mode from dbt_load_file the module "dbtext" searches this file in a directory called "/usr/local/etc/ser" and NOT in the dir given by the "modparam"-line
Can somebody give me a hint, why this occurs?
Another problem I had with the strncpy/strncat of database and table-name. I had to change a line in db_file.c at line 82 from strncpy(path+dbn->len+1,tbn->s,tbn->len) to strncat(path,tbn->s,tbn->len)
Is this a bug or is something wrong with my ser.cfg?
Thanks Thorsten
ser-version: 0.8.14
mt> -----Ursprüngliche Nachricht----- mt> Von: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro] mt> Gesendet: Freitag, 29. Juli 2005 10:55 mt> An: Müller Thorsten mt> Cc: serusers@lists.iptel.org mt> Betreff: Re: [Serusers] dbtext: table not loaded. example desired mt> mt> mt> Hello, mt> mt> On 07/29/05 11:16, Müller Thorsten wrote: mt> mt> > Hi all, mt> > mt> > I try to set up ser with dbtext as authentication basis. mt> I run in some mt> > problems because the database is not found: mt> > DBT:db_query: table not loaded. mt> > mt> > After some googling a found that Cesc mt> [cesc.santa@gmail.com] had also mt> > done some work with dbtext and mailed that to "serusers" mt> or "serdev" mt> > mailinglists mt> > mt> > In a mail from May and June 05 he told that he has mt> written a "serctl" mt> > for dbtext and a script to produce the necessary files. mt> > mt> > Has somebody got these things and can mail me these mt> files! I could not mt> > found them in the mailing history. mt> > mt> > Has somebody also dealed with dbtext and can give me some example mt> > files for ser.cfg and dbtext files for mt> "authentication/subscriber" and mt> > "location". mt> > mt> rhe readme file of dbtext module has some examples of table mt> structures mt> as well as a simple config file. mt> mt> http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/mod mt> ules/dbtext/README?rev=HEAD&content-type=text/vnd.viewcvs-markup mt> mt> Daniel mt> mt> > Thanks in advance mt> > mt> > Thorsten Mueller mt> > mt> > ser 0.8.14 cross-compiled for arm mt> > My ser.cfg: mt> > #################################################### mt> > ... mt> > # Added by mt for authentication with dbtext mt> > loadmodule "/usr/local/lib/ser/modules/auth.so" mt> > loadmodule "/usr/local/lib/ser/modules/auth_db.so" mt> > loadmodule "/usr/local/lib/ser/modules/dbtext.so" mt> > mt> > modparam("auth_db", "db_url","dbtext:///var/dbtext/ser") mt> > mt> > # -- auth params -- mt> > modparam("auth_db", "calculate_ha1", 1) mt> > modparam("auth_db", "password_column", "password") mt> > modparam("auth_db", "user_column", "username") mt> > modparam("auth_db", "domain_column", "domain") mt> > ... mt> > mt> > if (uri==myself) { mt> > mt> > if (method=="REGISTER") { mt> > mt> > if (!www_authorize("domain.com", "subscriber")) { mt> > www_challenge("domain.com", "0"); mt> > break; mt> > }; mt> > save("location"); mt> > break; mt> > } mt> > ... mt> > ##################################################### mt> > mt> > I have a file in /var/dbtext/ser which is called "subscriber": mt> > ##################################################### mt> > username(str) password(str) ha1(str) domain(str) ha1b(str) mt> > suser:supasswd:xxx:domain.com:xxx mt> > ##################################################### mt> > mt> >----------------------------------------------------------- mt> ------------- mt> > mt> >_______________________________________________ mt> >Serusers mailing list mt> >serusers@lists.iptel.org mt> >http://lists.iptel.org/mailman/listinfo/serusers mt> > mt> > mt>