Is terminating the server the correct behaviour on a setup failure? There is a limitation in the new thread startup code in that the subscription will receive a success response regardless of the return value of MainSetup, and this is a change over the old setup method. If you really want the whole server torn down in a setup failure you should trigger this with an exit call in your driver.

The TODO that is marked is to add a general way for drivers to indicate to their subscribers that something has gone wrong. This could be at setup time, or could be during operation (cable pulled out, peripheral battery failed...) This has not been implemented, I think it is targetted for a '3.1' release or something like that.

Toby

2009/8/11 Patrick Beeson <beeson.p@gmail.com>
I see in threaded_driver.cc, there is a TODO to handle -1 from
MainSetup().  I'm super busy working on too many things to figure out
the new ThreadDriver code, but I would like to 'bump' this so it might
be looked at soon.

Patrick Beeson wrote:
> In Player-3.0 (svn trunk), I'm experiencing strange things when catching
> an error in MainSetup() (Threaded Driver) and returning -1.  I would
> expect this to bring Player down, but instead, Player prints an error
> message then just sits there indefinitely.  I have to CTRL-C, then I get
> a message about StopThread.  In Player 2.x, this worked properly and
> would shut down all thread and bring down Player.  Below I am running
> with a single plugin driver:
>
> ------------------
> invoking player_driver_init()...
> COMPASS driver initializing
> COMPASS driver done
> success
> COMPASS using 2Hz cycle rate (500.000 msecs duration)
> listening on 6665
> Listening on ports: 6665
> COMPASS driver setup
> Opening of /dev/compass at baud 19200 is ... unsuccessful
> error   : COMPASS could not be initialized
> error   : Driver failed to Setup (-1)
>
> (sits here)
>
> ^CQuitting.
> error   : StopThread called when state != running or restarting (0)
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-developers mailing list
Playerstage-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-developers