Strange error while working on RPC backend

Derek Atkins warlord@MIT.EDU
14 Mar 2001 19:27:12 -0500


Dave Peticolas <dave@krondo.com> writes:

> Derek Atkins writes:
> > Dave Peticolas <dave@krondo.com> writes:
> > 
> > > > At this last step (notice that the rpc server was not restarted!)  I
> > > > get that xml error.  The error happens as a part of gnc_book_load().
> > > 
> > > So on the second pass the server is trying to open the file again?
> > > How does the server open the file?
> > 
> > When a client connects, it does:
> > 	gnc_book_new()
> > 
> > Then the client calls book_begin, so it does:
> > 	gnc_book_begin()
> > 
> > then during the load operation it does:
> > 	gnc_book_load()	
> 
> I'm not sure what's going wrong here. Is the file being closed
> by the server when the client exits the first time?

It should.  When sync() is called, the data is synced to the server
and then the server called gnc_book_save().  If the client exists
cleanly, book_end() will then call the server which calls
gnc_book_end().  Also, when the client disconnects, regardless of
whether they 'saved' or not, or even exited cleanly, the server calls
gnc_book_destroy().

> dave

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available