PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: John_Erjavec at cargill dot com
Subject: Re: problem with custom callback functions
Date: Mar 3 1999 6:07AM

     
I'm not sure exactly what the cause of the problem was, but we ended up tracing 
it to the if () {} statements that I had in the message handler.  Inside each 
one of those, I had a call to CS_SUCCEED and a return(), except on the last 
case, where it would have fallen through.  When I took out all the CS_SUCCEED 
calls, and made the whole thing a big if-elsif-else then it worked.  (It did 
_not_ work when I had the exact code from the man page, but with the if's, and 
it did when I just commented out the if's.  If there is a reason that this would
be happening, that would probably be good to know, and maybe to note in the man 
page.  Thanks for the help.

-JEV

______________________________ Reply Separator _________________________________
Subject: Re: problem with custom callback functions
Author:  mpeppler (mpeppler@mbay.net) at mtka-unix-mime
Date:    3/2/99 7:52 PM


John_Erjavec@cargill.com writes:
 > All-
 > 
 > Has anyone run into weird callback problems before?  Here is what is going on
     
 > with mine.  When I run the program with the callback functions, I get the 
 > following error message:
 > 
 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 > Start of ASE 11.9.2 upgrade.
 > Step 3 -- Dropping LynxSP.
 > Use of uninitialized value at ./rssd_1192_upgrade.spl line 163,  chun
k
 >         1 (#1)
 >     
 >     (W) An undefined value was used as if it were already defined.  It was
 >     interpreted as a "" or a 0, but maybe it was a mistake.  To suppress this 
 >     warning assign an initial value to your variables.
     
That's a benign message (usually).
     
 >     
 > ct_cmd_alloc failed at ./rssd_1192_upgrade.spl line 163,  chunk 1. 
 > 
     
This one's the real problem. Why does ct_cmd_alloc() fail? What does 
line 163 look like?
     
     
 > Open Client Message: (In msg_cb)
 > Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
 > Message String: ct_con_drop(): user api layer: external error: There is a usa
ge 
 > error.  This routine has been called at an illegal time.
     
This is probably because of the error above - it tries to drop the 
context, but the internal state of CTlib is somehow inconsistent.
     
The real problem is the ct_cmd_alloc() failure.
     
Michael
-- 
Michael Peppler         -||-  Data Migrations Inc. 
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler 
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com