home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!s5!is1.is.morgan.com!is.morgan.com!shafla
- From: shafla@is.morgan.com (Sharon Flanagan)
- Subject: Open Server problem
- Message-ID: <1993Jan6.101709@is.morgan.com>
- Sender: news@is.morgan.com
- Nntp-Posting-Host: shafla
- Organization: Morgan Stanley - IS
- Date: Wed, 6 Jan 1993 15:17:09 GMT
- Lines: 43
-
-
- Hello,
-
- BACKGROUND:
-
- I'm working with a Sybase open server based on the "utility" sample program.
- I've written an RPC which allowes various clients to send and recieve
- information. When a client registers for information, it sends the name of
- the RPC, a paramater that indicates it is a register message, its transaction
- type, and some parameters to hold the information it wants. The function
- allocates space for a new srvproc, uses srv_bmove() to copy the srvproc and
- this new srvproc is then added to a linked list which is indexed by
- transaction type. When a client notifies the open server that it has
- information, it sends the name of the RPC, a parameter that indicates that
- it is a notify message, its transaction type, and parameters which hold its
- information. The code goes through the linked list - if it finds a matching
- transaction type, it puts information from the current srvproc to a copy of the srvproc from the linked list.
-
- PROBLEM:
- The forementioned program works with the first notify. I use the
- srv_senddone() with the SRV_DONE_FINAL flag set when I return the information
- to the registering client. However, when another client notifies that it
- has information, my program gets a SEGV error when it tries to find the number
- of parameters in the linked list srvproc. The srv_senddone() function
- seems to clear out the parameters from the srvproc in the linked list -
- I've used a srv_rpcparams() call after the srv_senddone() and its result is
- -1 (perhaps no current RPC). I've used srv_bmove to copy the srvproc from
- the linked list into another area of memory - but it didn't help.
-
- How can I send information back to the clients multiple times over the open
- server - client connection? Is there a way to circumvent the "flush" which
- happens with a srv_senddone? If I use the SRV_DONE_MORE flag, the client
- doesn't get data.
- I've tested the open server using functions which login to it and then
- send information via the dbproc (dprpcparam(), dbrpcsend()).
-
- Any ideas?????
-
-
- Thanks in advance for any assistance.
-
- Sharon Flanagan
- shafla@is.morgan.com
-