View previous topic :: View next topic |
Author |
Message |
PlasmaJohn
Joined: 04 Mar 2005 Posts: 70 Location: The Garage
|
Posted: Fri Jul 17, 2009 23:10 Post subject: Alpha plugin: Vaultster reloaded |
|
|
CoPaP is a collection of independent PW's who's PC's can travel between each other. Since we don't have shared vaults we use the Vaultster plugin to copy the bics from the srouce to the destination vault. Up until the Spring of 2009, all of CoPaP ran various flavors of Win32 OS's with the Windows NWN server and the Win32 NWNX Vaultster plugin. In the Spring Avlis migrated to Linux VM's on VMWare ESXi server.
Unfortunately it was discovered that the Linux version of the Vaultster plugin is completely out of date. I started by trying to port the existing Windows version, but it was too closely tied to the Windows API. I then documented the protocol and rewrote it in (more) portable code using Boost (with the glaring exception of the directory searching bits).
All support for the GET command was removed. The existing Win32 code base blocks it after the connection has been established, this version returns failure immedately.
The server (receiver) is now standalone. It never made sense to me why it should be tied to a module and vice-versa where a crash in one affected the other.
The plugin is located in plugins/vaultster
The server is located in vaultster-serv
You'll need boost::asio, boost::system, boost::program_options and boost::thread to compile. I tested against boost 1.37 backported to Ubuntu 8.04.2. Boost 1.34.1 is too old.
Warning: this is only unit tested, there are probably some wickedly subtle bugs in here that need to be thrashed out. The transfers do pass an md5sum test.
http://www.projectplasma.com/NWN/vaultster-reloaded.tar.gz |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Fri Jul 31, 2009 2:41 Post subject: |
|
|
It builds fine against Ubuntu's libboost1.35-dev package. _________________ Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/
<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.
<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for? |
|
Back to top |
|
|
Themicles
Joined: 23 Jan 2005 Posts: 30 Location: Wolverine Lake, MI
|
Posted: Tue Sep 08, 2009 21:06 Post subject: |
|
|
Zebranky wrote: | It builds fine against Ubuntu's libboost1.35-dev package. |
And of note, the .debs for libboost1.35 meant for Ubuntu 8.10 also appear to work fine on 8.04.
One major show stopper for the moment: long filenames with apostrophes immediately cause a Segmentation fault on a send. Good news is that the new Linux vaultster-serv receives the same filename just fine. _________________ World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org |
|
Back to top |
|
|
PlasmaJohn
Joined: 04 Mar 2005 Posts: 70 Location: The Garage
|
Posted: Wed Sep 09, 2009 6:32 Post subject: |
|
|
Thanks for the help testing
There are two bugs.
First there's an off-by-one in client.c around line 384 that prevented Themi's bic file from matching correctly. Change if(len>14) len=14; to if(len>15) len=15;
The segfault is probably in the "couldn't find a match" error handling code around line 425, but I'm not seeing anything obvious by inspection. Unfortunately the paying job is going to keep me super busy over the next several days. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Oct 07, 2009 23:57 Post subject: |
|
|
http://artemis.mercuric.net/vaultster-linux-getexportpending.rar
Added NWNX!VAULTSTER!GETEXPORTPENDING method, which returns the value of the global "there's a character waiting to save" flag. Useful for making sure that a character has actually saved before sending, since it's done pseudo-asynchronously.
Edit: Oh, and there's a tiny update to the includes tree in SVN to name the field I used in CServerExoAppInternal. Make sure you grab that. _________________ Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/
<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.
<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for? |
|
Back to top |
|
|
|