Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Martin Hanley on January 01, 1970, 12:00:00 AM

Title: TLib error codes
Post by: Martin Hanley on January 01, 1970, 12:00:00 AM
I'm using the TLib function TOpenServerEx() to connect to a local copy of Express. In the development environment, this is returning the correct CTI server value, but once it's made runtime I'm getting the following error codes back:

21 if I use a symbolic name for the host
24 if I use the IP address for the host

The runtime image is running on the same machine, although from a different directory.

I can't find anything on these in the manuals, nor anything useful in the KnowledgeBase. The only clue is in connection.h:

#define C2K_ERR_UNKNOWN_HOST 21 /* hostname not resolved */
#define C2K_ERR_CANT_CREATE_SOCKET 24 /* error in socket(3N) */

Any ideas?

Cheers,
Martin

Title: TLib error codes
Post by: Martin Hanley on January 01, 1970, 12:00:00 AM
Excellent! That has solved my problem entirely. More annoyingly, the call is actually in the original code I wrote but I must have had a brainstorm or something because it's not in the current version.

By the way, I imagine the development environment (IBM VisualAge for Smalltalk) was opening sockets, which is why it would work there.

Thank you for your help. This was driving me mad :)
Martin
Title: TLib error codes
Post by: leszekm on January 01, 1970, 12:00:00 AM
It seems this is the socket initialisation problem.
Do you call conn_startup() function before TOpenServerEx (and conn_cleanup when the program cleans up before quitting)?
I can't explain why it would work without conn_startup in the development environment, but I think it could (miracles happen... ;) ).

Regards,
Leszek