[ freetds-Patches-578095 ] Do not use global msg/err handlers (2)

noreply at sourceforge.net noreply at sourceforge.net
Sat Jul 6 08:00:23 EDT 2002


Patches item #578095, was opened at 2002-07-06 16:00
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=578095&group_id=33106

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Frediano Ziglio (freddy77)
Assigned to: Nobody/Anonymous (nobody)
Summary: Do not use global msg/err handlers (2)

Initial Comment:
I opened a new patch with different implementation



 Why?

Is some environment (think as apache with perl/db,

php/odbc and php/sybase) g_tds_err_handler and

g_tds_msg_handler (global pointer to function to catch

messages and errors from tds) can be shared between

some library (odbc, ctlib, dblib) causing some problem

(error sended to wrong library). This can depend also

by the system and how shared oject is loaded. 



 How?

Add members to TDSSOCKET to keep pointer to message

function. Add tp TDSCONTEXT same members and pass it to

tds_connect (intead of TDSLOCINFO). Also removed

connection_list stuff from TDSCONTEXT and put to a new

struct (DBLIBCONTEXT).



I hope this patch will be discussed on ML.

Some point raised:

- in CTLib is right setting message handler in ct_init

or best to move this stuff after creating context?

- tds_convert should use TDSCONTEXT instead of TDSLOCINFO?



freddy77



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=578095&group_id=33106



More information about the FreeTDS mailing list