freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS <freetds AT franklin.oit.unc.edu>
- Subject: Some API change
- Date: 16 Aug 2002 09:11:00 +0200
I'd like to change some API declaration
1- tds_put_XXX instead of use a normal pointer use a const pointer
ie:
int tds_put_n(TDSSOCKET *tds, unsigned char *buf, int n);
instead of
int tds_put_n(TDSSOCKET *tds, const unsigned char *buf, int n);
2- use correct pointer type in msg handlers
int (*msg_handler)(TDSCONTEXT*, TDSSOCKET*, TDSMSGINFO*);
instead of
int (*msg_handler)(void*, void*, void*);
This remove the need to cast at every message handling function
Note also that this function prototype had been changed from last
release
3- tds_answer_challenge.
It return a static buffer (with all reentrant/thread problem).
Also I added nt_resp code so a single answer are insufficient.
void tds_answer_challenge(char *passwd, char *challenge,TDSANSWER*
answer);
instead of
char* tds_answer_challenge(char *passwd, char *challenge);
I added a parameter for storing result.
Structure definition is
typedef struct tds_answer
{
unsigned char lm_resp[24];
unsigned char nt_resp[24];
} TDSANSWER;
Note that this function is not exported from public include.
Is correct to add this stuff to tds.h.in ?
I suggest to add a private header for two reason:
- do not publish private function/structure
- have a chance to compiler to check parameters
Some functions are declared extern ... in modules but doing so
if I change real parameter on other module the compiler give no
warning
freddy77
-
Some API change,
Frediano Ziglio, 08/16/2002
- <Possible follow-up(s)>
- Re: Some API change, Steve Langasek, 08/16/2002
- Re: Some API change, Mark J. Lilback, 08/16/2002
- Re: Some API change, Steve Langasek, 08/16/2002
- Re: Some API change, Brian Bruns, 08/16/2002
Archive powered by MHonArc 2.6.24.