View Issue Details

IDProjectCategoryView StatusLast Update
0002400VALENTINA SERVERAPIpublic2007-06-26 07:37
ReporterEytan BernetAssigned ToIvan Smahin 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.5.10 
Target VersionFixed in Version3.1 
Summary0002400: ClientInfo call fails
DescriptionAttempting to do a dbi.ClientInfo call results in <void> (using V4MD Xtra). Unable to get the user info to see who is logged in.
TagsNo tags attached.

Relationships

related to 0002404 closed Access to VClientInfo crashes application 

Activities

Eytan Bernet

Eytan Bernet

2007-06-22 09:31

reporter   ~0002281

Mac OS 10.4.9, embedded server running. New database created (2nd DB after Master)
Connect using bonjour form another machine (windows XP), have a connection established and open, database open. Connected using Director and the V4MD connector.
Run sample VServer in Common/Vserver.
VServer iterated through the first DB (Master) all results returned are correct, no connections
VServer gets to the 2nd DB (the one I created and am connected to). SHows there is one connection.

   clientCount = dbi.clientCount -- shows 1 client connected
    repeat with j = 1 to clientCount
      ci = dbi.ClientInfo(j) -------- RETURNS VOID!!!!!
      if CheckValError() then exit ----- DOES NOT EXIT!!!!! NO ERROR DETECTED!!!

Server is embedded server, using an assigned serial #
Only modifications made to VServer code are:

 gConnection = new(Xtra "VConnection", "localhost", "sa", "sa", 15433, 0, "<myserial#>" )

and 15433 is the port I am using

My expected behavior is for ci to be valid so as I can check the user name
Ruslan Zasukhin

Ruslan Zasukhin

2007-06-23 01:06

administrator   ~0002283

Ruslan: I again have try this on MAC PPC. NOT REPRODUCED.

1) I have connect by VStudio, CREATE db,
        RUN EXMAPLE -> I see ClientInfo

2) I close db -> now ZERO clientinfo

3) restart server -> ZERO client

4) again connect from VStudio and OPEN db
       RUN EXAMPLE -> I see "sa" client again/

all works as expected !!
Ruslan Zasukhin

Ruslan Zasukhin

2007-06-23 01:09

administrator   ~0002284

QUESTION:

**** DID YOU RUN this on
    a) MAC PPC
    b) MAC INTEL
    c) WIndows

I mean try it on all 3. May be only MAC INTEL glitches.
Kirill Pekarov

Kirill Pekarov

2007-06-23 01:55

developer   ~0002285

Actually, some problem is here.
First is an error in example VServer:
 ci = dbi.ClientInfo(i)
must be replaced with ci = dbi.ClientInfo(j)

And Second is that DatabaseInfo::ClientInfo() start count clients from second.
So, to get first client call function must be dbi.ClientInfo(2)
Eytan Bernet

Eytan Bernet

2007-06-25 11:29

reporter   ~0002297

Try all those changes. Use PPC G5 Mac OS X 10.4.10
Have connection open from another machine
Running Vserver example, with the following changes:
gClient is set to TRUE

StartMovie looks like this:

global gServer
global gConnection


--
on startMovie
  Example_Init()
  
  
  gConnection = new(Xtra "VConnection", "localhost", "sa", "sa", 15433, 0, "myserialnumber" )
  gConnection.Open()
  if CheckValError() then exit
  
    vs = new(Xtra "VServer", gConnection)
    if CheckValError() then exit
    
    put vs.version
    put vs.getVariable("SystemCatalog")
    put vs.getVariable("CacheSize")
    put vs.getVariable("LogToConsole")
    put vs.getVariable("LogToFile")
    put vs.getVariable("VerboseLevel")
    put vs.getVariable("Port")
    put vs.getVariable("Threads")
    put vs.getVariable("Backlog")
    put vs.getVariable("MaxClientTimeout")
    
    --Iterate all the databases on the server
    dbCount = vs.databaseCount
    repeat with i = 1 to dbCount
      dbi = vs.DatabaseInfo(i)
      if CheckValError() then exit
      
      put "db_Name = " dbi.name
      put "db_Path = " dbi.path
      put "db_ClientCount = " dbi.clientCount
      put "db_CursorCount = " dbi.cursorCount
      
      --Iterate all the connected clients for database
      clientCount = dbi.clientCount
      repeat with j = 2 to clientCount
        ci = dbi.ClientInfo(j)
        if CheckValError() then exit
        
        put "client_address = " ci.address
        put "client_connectionID = " ci.connectionID
        put "client_cursor_count = " ci.cursorCount
        put "client_login = " ci.login
        put "client_port = " ci.port
      end repeat
      
    end repeat
    
    gConnection.Close()
    
    Example_Shutdown()
  
end startMovie

ci is ALWAYS void
Ruslan Zasukhin

Ruslan Zasukhin

2007-06-26 07:37

administrator   ~0002301

THIS BUG IS FIXED for 3.1
please not reopen this issue.

to discuss issues of 2.5.10 build you can make a new issue.

-----
I afraid that 2.5.10 will not work with any workaround.
I recommend try to find other way for your application.

Issue History

Date Modified Username Field Change
2007-06-20 12:39 Eytan Bernet New Issue
2007-06-22 09:31 Eytan Bernet Note Added: 0002281
2007-06-23 01:06 Ruslan Zasukhin Note Added: 0002283
2007-06-23 01:09 Ruslan Zasukhin Note Added: 0002284
2007-06-23 01:55 Kirill Pekarov Note Added: 0002285
2007-06-23 04:59 Ruslan Zasukhin Relationship added related to 0002404
2007-06-25 00:34 Ivan Smahin Project ADK-V4MD => VALENTINA SERVER
2007-06-25 00:35 Ivan Smahin Fixed in Version => 3.1
2007-06-25 00:35 Ivan Smahin Status new => resolved
2007-06-25 00:35 Ivan Smahin Resolution open => fixed
2007-06-25 00:35 Ivan Smahin Assigned To => Ivan Smahin
2007-06-25 11:29 Eytan Bernet Note Added: 0002297
2007-06-25 11:29 Eytan Bernet Status resolved => feedback
2007-06-25 11:29 Eytan Bernet Resolution fixed => reopened
2007-06-26 07:37 Ruslan Zasukhin Status feedback => resolved
2007-06-26 07:37 Ruslan Zasukhin Resolution reopened => fixed
2007-06-26 07:37 Ruslan Zasukhin Note Added: 0002301