Results 1 to 1 of 1
Hi all,
I'm building an App with Flex as client UI and C CGI in Server.
The steps to init the system are.
1- Client sends "START SERVER SERVICE"
2- ...
- 09-28-2009 #1
Something strange with CGI in Apache2
Hi all,
I'm building an App with Flex as client UI and C CGI in Server.
The steps to init the system are.
1- Client sends "START SERVER SERVICE"
2- Client sends "GET SESSION"
3- Client sends the login info (USER/PASS)
In the CGI
1- starts the server service.
This is a daemon which does all the writing to the xml files and keeps the session alive for a period of time, after the last keep alive Sent by the client.
2- builds a session ID and return it to the client. Also send it to the Server Service through a pipe to create the session file with the clients info.
3- simple login with pwd crypted with the session.
The problem is between step 1 and 2.
The server service starts ok, and the session return ok.
But when I put it all together in the client, which sends the "START SERVICE" and when this returns "OK", then sends the "GET SESSION"; simply stalls there.
I could see, apache received the step 1, and starts the daemon, but the step 2, I don't see the server receiving the call.
I tryed it with the app build in Flex, and also with Firefox.
in the URL I put the params for step 1, and as soon as I get the XML returned I send the step 2; and there it stays; the firefox in the status bar says "Waiting for 172.17.1.66..."
The cgi code part for starting the Server daemon:
The call:Code:FILE *cmm_runProcess( char *p, bool bKeep, bool *bOpened ){ FILE *f = NULL ; f = popen( p, "r" ) ; if ( f == NULL ) return NULL ; (*bOpened) = TRUE ; if ( !bKeep ){ pclose( f ) ; return NULL ; } return f ; }
Code:cmm_runProcess( svc_bg, FALSE, &bOpened ) ; if ( bOpened ){ ...... }
Another strange thing is that if in firefox or Flex I send the step 2 tuice it works.
This is, I send the step 2, and I re-send it immediately. In Flex simple put the call tuice.
Thanks,
Guillermo.


Reply With Quote