Skip to Content.
Sympa Menu

freetds - Re: [freetds] a few ctlib issues

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark J. Lilback" <mark AT lilback.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] a few ctlib issues
  • Date: Tue, 17 Dec 2002 10:49:45 -0500

I've traced down the ct_cancel error I'm getting and wanted to ask opinions on fixing it.

According to the ctlib reference docs, ct_fetch should only be called if ct_results returns a value indicating fetchable results. In the case of an error, ct_results returns CS_CMD_FAIL which does not indicate fetchable results.

I see a couple of places that could be adjusted based on this.

1) make ct_fetch return CT_FAIL if cmd->curr_result_type does not indicate fetchable results.

2) have ct_cancel check the curr_result_type of the cmd being canceled and not call ct_fetch if there is nothing to fetch. It should also return CS_SUCCEED and not CS_FAIL if there are no fetchable results.

I've made both changes locally and will commit them unless someone thinks only one of them should be made.

Also, the cs_command struct has a variable named cmd_done that is never used in any of the soure files in src/ctlib. Any reason to keep it?


--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<mark AT lilback.com> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin




Archive powered by MHonArc 2.6.24.

Top of Page