From niclas at acc.umu.se Sun Aug 6 20:03:45 2006 From: niclas at acc.umu.se (Niclas Fredriksson) Date: Mon, 7 Aug 2006 03:03:45 +0200 (MEST) Subject: [netrek-dev] Bug with the geno parade Message-ID: Is this where you report bugs with the server code? If ships named g and above (Fg, Rh, Ki, Oj, etc) are in the game and a geno happens, those ships stack up on top of other ships in the geno parade, which looks really ugly. Okay, maybe not a bug and certainly nothing we can't live with, but it looks bad and I hope it will be fixed. :) --Niclas From quozl at us.netrek.org Sun Aug 6 21:07:31 2006 From: quozl at us.netrek.org (James Cameron) Date: Mon, 7 Aug 2006 12:07:31 +1000 Subject: [netrek-dev] Bug with the geno parade In-Reply-To: References: Message-ID: <20060807020731.GB9254@us.netrek.org> On Mon, Aug 07, 2006 at 03:03:45AM +0200, Niclas Fredriksson wrote: > Is this where you report bugs with the server code? Yes! Thanks. > If ships named g and above (Fg, Rh, Ki, Oj, etc) are in the game and a > geno happens, those ships stack up on top of other ships in the geno > parade, which looks really ugly. > > Okay, maybe not a bug and certainly nothing we can't live with, but it > looks bad and I hope it will be fixed. :) I'll look into fixing this. I'll write a test that reproduces the situation. Presumably these are robots rather than observers? -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From williamb at its.caltech.edu Mon Aug 7 03:41:15 2006 From: williamb at its.caltech.edu (William Balcerski) Date: Mon, 7 Aug 2006 01:41:15 -0700 (PDT) Subject: [netrek-dev] Bug with the geno parade In-Reply-To: <20060807020731.GB9254@us.netrek.org> References: <20060807020731.GB9254@us.netrek.org> Message-ID: > > If ships named g and above (Fg, Rh, Ki, Oj, etc) are in the game and a > > geno happens, those ships stack up on top of other ships in the geno > > parade, which looks really ugly. > > > > Okay, maybe not a bug and certainly nothing we can't live with, but it > > looks bad and I hope it will be fixed. :) > > I'll look into fixing this. I'll write a test that reproduces the > situation. Presumably these are robots rather than observers? > I tested this and found that normal newbie robots don't overlap, they appear in the ring normally, even though their slots are g and higher. Ind robots like terminator and the newbie Merlin robot do overlap player ships however. Did not test with practice robots. Did test with 1 player observer, did not see him appear. Bill From niclas at acc.umu.se Mon Aug 7 16:07:32 2006 From: niclas at acc.umu.se (Niclas Fredriksson) Date: Mon, 7 Aug 2006 23:07:32 +0200 (MEST) Subject: [netrek-dev] Bug with the geno parade In-Reply-To: <20060807020731.GB9254@us.netrek.org> References: <20060807020731.GB9254@us.netrek.org> Message-ID: On Mon, 7 Aug 2006, James Cameron wrote: > I'll look into fixing this. I'll write a test that reproduces the > situation. Presumably these are robots rather than observers? Yes, iggies (on continuum). --Niclas From williamb at its.caltech.edu Tue Aug 8 02:04:40 2006 From: williamb at its.caltech.edu (William Balcerski) Date: Tue, 8 Aug 2006 00:04:40 -0700 (PDT) Subject: [netrek-dev] Bug with the geno parade In-Reply-To: References: <20060807020731.GB9254@us.netrek.org> Message-ID: Darcs send not working with cygwin/outlook express so here's a patch manually. Bill * Fix for conquer parade alignment ntserv/conquer.c (conquer_ring_coordinates, conquer_ships_ring, and conquer_parade): Adds a counter variable to pass to the function which calculates ring coordinates, rather than passing the position in the player list. Prevents overlap of ships in the case where there are empty slots between active slots. hunk ./Vanilla/ntserv/conquer.c 67 -static void conquer_ring_coordinates(struct player *j, int h, int n, int *x, int *y) +static void conquer_ring_coordinates(struct player *j, int count, int n, int *x, int *y) hunk ./Vanilla/ntserv/conquer.c 69 - j->p_dir = h*256/(n+1); + j->p_dir = count*256/(n+1); hunk ./Vanilla/ntserv/conquer.c 124 + int count = 0; hunk ./Vanilla/ntserv/conquer.c 133 - conquer_ring_coordinates(j, h, n, &x, &y); + count++; + conquer_ring_coordinates(j, count, n, &x, &y); hunk ./Vanilla/ntserv/conquer.c 153 + int count = 0; hunk ./Vanilla/ntserv/conquer.c 160 - conquer_ring_coordinates(j, h, n, &j->p_x, &j->p_y); + count++; + conquer_ring_coordinates(j, count, n, &j->p_x, &j->p_y); } From quozl at us.netrek.org Wed Aug 9 00:04:05 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 9 Aug 2006 15:04:05 +1000 Subject: [netrek-dev] Bug with the geno parade In-Reply-To: References: <20060807020731.GB9254@us.netrek.org> Message-ID: <20060809050405.GA4816@us.netrek.org> On Tue, Aug 08, 2006 at 12:04:40AM -0700, William Balcerski wrote: > * Fix for conquer parade alignment Didn't apply, so I did something similar. I don't see how changing the position from a slot number to a count should make any difference to the problem. In the old code, all slot numbers are unique, so there should be unique ring positions. Iggies don't share slot numbers with players. Even with this patch, I still cannot prove that this fixes the problem, because I've not succeeded in attempts to reproduce the problem before this patch. How did you reproduce the problem? What did you have to change in tests/parade-bug-2006-08-07, or what did you do that was different? -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ -------------- next part -------------- New patches: [fix for conquer parade alignment, alternate quozl at us.netrek.org**20060809043954 * ntserv/conquer.c (conquer_ships_ring, conquer_parade): add a counter for calculating ring coordinates rather than using player list position. ] < > { hunk ./Vanilla/ntserv/conquer.c 123 /* animate a ring of ships, move them slowly into position */ static void conquer_ships_ring() { - int n, h; + int n, h, k; struct player *j; conquer_decloak(); hunk ./Vanilla/ntserv/conquer.c 128 n = conquer_count_players(); - for (h = 0, j = &players[0]; h < MAXPLAYER; h++, j++) { + for (h = 0, j = &players[0], k = 0; h < MAXPLAYER; h++, j++) { int x, y, dx, dy; if (j->p_status == PFREE) continue; if (j->p_no == conquer_player) continue; hunk ./Vanilla/ntserv/conquer.c 132 - conquer_ring_coordinates(j, h, n, &x, &y); + conquer_ring_coordinates(j, k++, n, &x, &y); dx = j->p_x - x; dy = j->p_y - y; if (abs(dx) < 50) { hunk ./Vanilla/ntserv/conquer.c 150 /* force the ring of ships into final position */ static void conquer_parade() { - int n, h; + int n, h, k; struct player *j; n = conquer_count_players(); hunk ./Vanilla/ntserv/conquer.c 154 - for (h = 0, j = &players[0]; h < MAXPLAYER; h++, j++) { + for (h = 0, j = &players[0], k = 0; h < MAXPLAYER; h++, j++) { if (j->p_status == PFREE) continue; if (j->p_no == conquer_player) continue; hunk ./Vanilla/ntserv/conquer.c 157 - conquer_ring_coordinates(j, h, n, &j->p_x, &j->p_y); + conquer_ring_coordinates(j, k++, n, &j->p_x, &j->p_y); j->p_speed = 0; } } } Context: [add test for conquer parade slot alignment bug quozl at us.netrek.org**20060808054700 * tests/parade-bug-2006-08-07: a test to try to reproduce the bug reported by Niclas where iggy slots end up in the same screen position as player slots. ] [add planet orbit and take test scripts quozl at us.netrek.org**20060808054456 * tools/setplanet.c: add be-orbited-by and be-taken-by test actions, for use by test scripts. They cheat, and are therefore not intended for production use. ] [minor indentation fixes prior to review quozl at us.netrek.org**20060808002418 * ntserv/conquer.c: tabify, some added lines lacked tabs, made it inconsistent. ] [Semi-critical update fix williamb at its.caltech.edu**20060622022126 * socket.c (updateClient): clarifies purpose of packet type check against 0x40, adds check for SP_S_YOU case. ] [Show geno messages for observers williamb at its.caltech.edu**20060622013521 * genspkt.c (sndSelf and sndSSelf): Factorized check for whether packet should be marked as critical. (check_sendself_critical): New function. Player status (via sndPStatus) is sent before player whydead (via sndSelf or sndSSelf). When whydead changes, the packet must be marked as critical in order for that information to arrive first, so that observers can get a proper whydead message upon genocide. This was previously done for just sndSelf, but with this patch, both sndSelf and sndSSelf now do it, and observers get geno messages with short packets on. ] [Formatting fix for if statement in interface.c williamb at its.caltech.edu**20060707151641 * interface.c: (do_refit). Fixes if statement split over 3 lines. ] [Command file for PreT robots williamb at its.caltech.edu**20060707152531 * robots/pret.c: (start_a_robot) Adds the ability to read in a command file, as per the command file defined in pretdefs.h, but which was unused for whatever reason. Note that both the newbie server and basepractice server are set to use the same file, defined as COMFILE in pretdefs.h, basepdefs.h, and newbiedefs.h. As these modes are mutually exclusive, it is ok for them to read in robot commands from the same commands file. M ./Vanilla/robots/pret.c -1 +3 ] [adjust test scripts for xtkill changes quozl at us.netrek.org**20060710014703 * tests: some scripts used "xtkill k" repeatedly to grant kills, changed to use the additional parameter. Note that this additional parameter is not immediately after the option, like it is with T or t options. ] [Xtkill settable kills williamb at its.caltech.edu**20060707153051 * xtkill.c (main): Adds the ability to specify the number of kills to increment the player, identical to how the increment armies option works, rather than just adding +1 kill per use of the xtkill k option. M ./Vanilla/tools/xtkill.c -2 +5 ] [Xtkill bug fixes williamb at its.caltech.edu**20060623040057 * xtkill.c (Usage): Added 2 missing options (u and H) to options list. (main): Removed call to getshipdefaults(), as this data was already in memory, and it had the unintended consequence of erasing any modifications to ship values that were set in the sysdef file, forcing a sysdef reload every time xtkill was used. ] [robotd-carriage-return-added-to-death-messages.dpatch jimmyhua73 at yahoo.com**20060630092932 * robotd/death.c in function death(), I added newline character to the reason of death on all mprintf statements "\n", so it displays properly in debug mode. ] [freebsd compilation fix, missing header quozl at us.netrek.org**20060705062726 * ntserv/main.c: add signal.h include, after a report from a FreeBSD user showed that my enthusiastic trimming of headers had broken compilation on other operating systems. ] [avoid lies to metaserver due pre-t robots quozl at us.netrek.org**20060703021915 * solicit.c: count PFBPROBOT slots as being free, since we expect them to back off and quit if a player arrives, so that the metaserver report of players properly excludes pre-t robots. ] [further-fixes-to-war-decs.dpatch jimmyhua73 at yahoo.com**20060702153128 This completes the fixes I started with war declarations. Basically, war is declared when 1. t-mode starts. 2. bot is forced to switch teams Further peace is declared when: 3. everytime you take out a new ship. This should cover all scenarios in a typical pickup game. Tested by having robots join a bronco style game. 1 Kli, 4 feds, 4 Roms. Check war decs. Have the 1 kli get forced to join one of the t-mode teams. Check war decs Have Feds get timercided, and get forced to join Klis. Check war decs. Wait till Roms cause a genocide (Roms will take a neutral planet!). Then games continues as Rom vs. Kli, and check war decs. Changelog here: * robotd/update_players.c changed declare_intents() function so that it will return success or failure codes. Also, changed function so that you may declare peace only, by doing declare_intents(1). * robotd/decide.c added static int needswardec in function decide() so that robot can track when t-mode dies off and starts up again. * robotd/decide.c added in function decide() logic so, declare_intents(0) function gets called when t-mode just starts up. * robotd/decide.c modified in function decide() other calls to declare_intents() so that they conform to the extra parameter passing * robotd/robot.c added comment in function s_recharge() a peace request never gets called when robot orbits a planet it originally wanted to refuel from * robotd/robot.c in function find_safe_planet() fixed some buggy logic which allowed robots to head towards hostile planets to refuel/repair. * robotd/robot.c in function reset_r_info() modified call to declare_intents() to conform to newly modified function. ] [continuum ghostbust diagnostics quozl at us.netrek.org**20060630025545 * daemonII.c (ghostmess): add reason for ghostbust to message, and increase logging of normal ghostbust timeout in ERRORS. ] [untabify daemon main quozl at us.netrek.org**20060630022904 * daemonII.c: removed all tabs using untabify in emacs. ] [newbie robots war declarations test quozl at us.netrek.org**20060630020843] [Newbie robots now declare war properly in pickup games quozl at us.netrek.org**20060630011431 Derived from Jimmy Huang's patch of the same name. * robotd/data.c: fixed comment misspelling in int delay. delay for declaring war. * robotd/decide.c (decide): added some comments to help me follow the code better * robotd/main.c (main): fixed up indentation of variable declarations. Added switchedteams variable. Modified main() function so that when a team switch occurs, declare_intents() gets called after choosing a new ship. * robotd/robot.c (reset_r_info): added some commentary on the declare_intents() call, which only gets something done only if someone sends a reset command to the robot. * robotd/robot.c (send_initial): removed commented code of declare_intents(). This was a bug workaround, robot sends a dummy packet so it doesn't get ghostbusted. Doesn't seem needed anymore. * robotd/update_players.c (declare_intents): added commentary on how this function is supposed to work. Function will now properly declare war on the 2 teams with the most players that isn't the same team as yourself. And then declares peace with everyone else. ] [continuum ban vote tweaks 2006-06 quozl at us.netrek.org**20060622015354 Following review of continuum recording 2006-06-07-22-00: - require four votes to ban instead of two, to defeat ban scumming, - expire ban votes within two minutes instead of ten, - expire eject votes within five minutes instead of ten. ] [xtkill ship change fixes williamb at its.caltech.edu**20060620005009 * tools/xtkill.c: Adds the ability to set ship to galaxy class, removes unneccessary ship size change for ATT, and updates the list of valid ship types to include the super SC with 1 point torps (this was missing from list of valid ship types). M ./Vanilla/tools/xtkill.c -8 +5 ] [newbie-observer-ports.dpatch jimmyhua73 at yahoo.com**20060616103448 * docs/sample_ports added observer port definitions for newbie server. Added commentary to make it easier to configure the port configuration for a newbie server setup. ] [Chaos mode starbase enhancements williamb at its.caltech.edu**20060606200821 * orbit.c, transwarp.c: Allows starbases to transwarp to and dock with other bases if chaos mode is activated. ] [Twarp message fix williamb at its.caltech.edu**20060606200652 * transwarp.c: Fixes outdated reference to transwarp hours. ] [ATT and invalid ship fixes williamb at its.caltech.edu**20060603092650 * getentry.c, main.c: allow listing of ATT on features screen, and allow player to select ATT from entry window if ship is defined in sysdef as a valid ship. Also fixes incorrect error message in the case of invalid ship type. ] [null-terminate-mapchars-indentfix Stephen Thorne **20060614103104] [null-terminate-mapchars jimmyhua73 at yahoo.com**20060614105540 * robotd/struct.h modify mapchars to 3 characters to hold the NULL at the end * robotd/enter.c initialize final character to be NULL at the end when the robot first enters the game. ] [robotd-improved-army-tracking.dpatch jimmyhua73 at yahoo.com**20060613104425 * INSTALL.Newbie updated installation documentation to reflect changes in code. Also, CONFIRM=0 only works, CONFIRM=2 does not work. * INSTALL.Newbie added toggle robdc, assume robots don't carry. Also added lookahead=0 to emulate how robots were before Trent fixed the torp-dir bug. * robotd/data.c added extern int robdc (robots don't carry) * robotd/data.h extern int robdc defaults to not activated. * robotd/data.h added compiler define NO_PFORBIT, so robot doesn't depend on PFORBIT flag to determine if someone is picking armies or not. * robotd/dmessage.c added robdc in help. added robdc in messaging logic. * robotd/update_players.c commented out a continue; statement as the for loop gets exited too quickly sometimes. * robotd/update_players.c stale information of p->closest_pl is kept even when enemy becomes invisible. Will be used later. * robotd/update_players.c don't update last x or y if invisible. * robotd/update_players.c changes to check_orbit() function to make sure players is marked as orbiting a planet when cloaked near a planet, or invisible. * robotd/update_players.c changed some debug statements to make them more readable during a denemy debug session. * robotd/update_players.c army_check1() and army_check2() added logic so if robdc is activated, robot doesn't track fellow robot carriers. * robotd/update_players.c added some commentary so the army tracking code is more readble. Commented out a beam-down to friendly in favor of the more pessimistic possibility that the planet simply popped. ] [Cross-transwarp check williamb at its.caltech.edu**20060608223709 * transwarp.c: Prevent transwarping to a base that is already in transwarp. ] [post 2.11.1 release process notes quozl at us.netrek.org**20060601040643] [include config.guess in make dist quozl at us.netrek.org**20060601033548] [include config.sub in make dist quozl at us.netrek.org**20060601033011] [TAG 2.11.1 quozl at us.netrek.org**20060601025406] Patch bundle hash: 6ebac8218ef875f66005eb316e72d48eb7229e27 From quozl at us.netrek.org Wed Aug 9 01:00:42 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 9 Aug 2006 16:00:42 +1000 Subject: [netrek-dev] Bug with the geno parade In-Reply-To: References: <20060807020731.GB9254@us.netrek.org> Message-ID: <20060809060042.GB4816@us.netrek.org> Ah, got it. There has to be empty slots before the robots before this problem occurs. My test now recreates the problem, and the patch mentioned fixes it. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ -------------- next part -------------- New patches: [fix test to correctly reproduce parade ring overlap quozl at us.netrek.org**20060809055741] < > { hunk ./Vanilla/tests/parade-bug-2006-08-07 29 sleep 0.5 done -# start a full set of robots -for x in `seq 7`; do +# start a partial set of robots +for x in `seq 3`; do lib/og/robot -h localhost -Tf 2>/dev/null >/dev/null & lib/og/robot -h localhost -Tr 2>/dev/null >/dev/null & sleep 0.8 } Context: [fix for conquer parade alignment, alternate quozl at us.netrek.org**20060809043954 * ntserv/conquer.c (conquer_ships_ring, conquer_parade): add a counter for calculating ring coordinates rather than using player list position. ] [add test for conquer parade slot alignment bug quozl at us.netrek.org**20060808054700 * tests/parade-bug-2006-08-07: a test to try to reproduce the bug reported by Niclas where iggy slots end up in the same screen position as player slots. ] [add planet orbit and take test scripts quozl at us.netrek.org**20060808054456 * tools/setplanet.c: add be-orbited-by and be-taken-by test actions, for use by test scripts. They cheat, and are therefore not intended for production use. ] [minor indentation fixes prior to review quozl at us.netrek.org**20060808002418 * ntserv/conquer.c: tabify, some added lines lacked tabs, made it inconsistent. ] [Semi-critical update fix williamb at its.caltech.edu**20060622022126 * socket.c (updateClient): clarifies purpose of packet type check against 0x40, adds check for SP_S_YOU case. ] [Show geno messages for observers williamb at its.caltech.edu**20060622013521 * genspkt.c (sndSelf and sndSSelf): Factorized check for whether packet should be marked as critical. (check_sendself_critical): New function. Player status (via sndPStatus) is sent before player whydead (via sndSelf or sndSSelf). When whydead changes, the packet must be marked as critical in order for that information to arrive first, so that observers can get a proper whydead message upon genocide. This was previously done for just sndSelf, but with this patch, both sndSelf and sndSSelf now do it, and observers get geno messages with short packets on. ] [Formatting fix for if statement in interface.c williamb at its.caltech.edu**20060707151641 * interface.c: (do_refit). Fixes if statement split over 3 lines. ] [Command file for PreT robots williamb at its.caltech.edu**20060707152531 * robots/pret.c: (start_a_robot) Adds the ability to read in a command file, as per the command file defined in pretdefs.h, but which was unused for whatever reason. Note that both the newbie server and basepractice server are set to use the same file, defined as COMFILE in pretdefs.h, basepdefs.h, and newbiedefs.h. As these modes are mutually exclusive, it is ok for them to read in robot commands from the same commands file. M ./Vanilla/robots/pret.c -1 +3 ] [adjust test scripts for xtkill changes quozl at us.netrek.org**20060710014703 * tests: some scripts used "xtkill k" repeatedly to grant kills, changed to use the additional parameter. Note that this additional parameter is not immediately after the option, like it is with T or t options. ] [Xtkill settable kills williamb at its.caltech.edu**20060707153051 * xtkill.c (main): Adds the ability to specify the number of kills to increment the player, identical to how the increment armies option works, rather than just adding +1 kill per use of the xtkill k option. M ./Vanilla/tools/xtkill.c -2 +5 ] [Xtkill bug fixes williamb at its.caltech.edu**20060623040057 * xtkill.c (Usage): Added 2 missing options (u and H) to options list. (main): Removed call to getshipdefaults(), as this data was already in memory, and it had the unintended consequence of erasing any modifications to ship values that were set in the sysdef file, forcing a sysdef reload every time xtkill was used. ] [robotd-carriage-return-added-to-death-messages.dpatch jimmyhua73 at yahoo.com**20060630092932 * robotd/death.c in function death(), I added newline character to the reason of death on all mprintf statements "\n", so it displays properly in debug mode. ] [freebsd compilation fix, missing header quozl at us.netrek.org**20060705062726 * ntserv/main.c: add signal.h include, after a report from a FreeBSD user showed that my enthusiastic trimming of headers had broken compilation on other operating systems. ] [avoid lies to metaserver due pre-t robots quozl at us.netrek.org**20060703021915 * solicit.c: count PFBPROBOT slots as being free, since we expect them to back off and quit if a player arrives, so that the metaserver report of players properly excludes pre-t robots. ] [further-fixes-to-war-decs.dpatch jimmyhua73 at yahoo.com**20060702153128 This completes the fixes I started with war declarations. Basically, war is declared when 1. t-mode starts. 2. bot is forced to switch teams Further peace is declared when: 3. everytime you take out a new ship. This should cover all scenarios in a typical pickup game. Tested by having robots join a bronco style game. 1 Kli, 4 feds, 4 Roms. Check war decs. Have the 1 kli get forced to join one of the t-mode teams. Check war decs Have Feds get timercided, and get forced to join Klis. Check war decs. Wait till Roms cause a genocide (Roms will take a neutral planet!). Then games continues as Rom vs. Kli, and check war decs. Changelog here: * robotd/update_players.c changed declare_intents() function so that it will return success or failure codes. Also, changed function so that you may declare peace only, by doing declare_intents(1). * robotd/decide.c added static int needswardec in function decide() so that robot can track when t-mode dies off and starts up again. * robotd/decide.c added in function decide() logic so, declare_intents(0) function gets called when t-mode just starts up. * robotd/decide.c modified in function decide() other calls to declare_intents() so that they conform to the extra parameter passing * robotd/robot.c added comment in function s_recharge() a peace request never gets called when robot orbits a planet it originally wanted to refuel from * robotd/robot.c in function find_safe_planet() fixed some buggy logic which allowed robots to head towards hostile planets to refuel/repair. * robotd/robot.c in function reset_r_info() modified call to declare_intents() to conform to newly modified function. ] [continuum ghostbust diagnostics quozl at us.netrek.org**20060630025545 * daemonII.c (ghostmess): add reason for ghostbust to message, and increase logging of normal ghostbust timeout in ERRORS. ] [untabify daemon main quozl at us.netrek.org**20060630022904 * daemonII.c: removed all tabs using untabify in emacs. ] [newbie robots war declarations test quozl at us.netrek.org**20060630020843] [Newbie robots now declare war properly in pickup games quozl at us.netrek.org**20060630011431 Derived from Jimmy Huang's patch of the same name. * robotd/data.c: fixed comment misspelling in int delay. delay for declaring war. * robotd/decide.c (decide): added some comments to help me follow the code better * robotd/main.c (main): fixed up indentation of variable declarations. Added switchedteams variable. Modified main() function so that when a team switch occurs, declare_intents() gets called after choosing a new ship. * robotd/robot.c (reset_r_info): added some commentary on the declare_intents() call, which only gets something done only if someone sends a reset command to the robot. * robotd/robot.c (send_initial): removed commented code of declare_intents(). This was a bug workaround, robot sends a dummy packet so it doesn't get ghostbusted. Doesn't seem needed anymore. * robotd/update_players.c (declare_intents): added commentary on how this function is supposed to work. Function will now properly declare war on the 2 teams with the most players that isn't the same team as yourself. And then declares peace with everyone else. ] [continuum ban vote tweaks 2006-06 quozl at us.netrek.org**20060622015354 Following review of continuum recording 2006-06-07-22-00: - require four votes to ban instead of two, to defeat ban scumming, - expire ban votes within two minutes instead of ten, - expire eject votes within five minutes instead of ten. ] [xtkill ship change fixes williamb at its.caltech.edu**20060620005009 * tools/xtkill.c: Adds the ability to set ship to galaxy class, removes unneccessary ship size change for ATT, and updates the list of valid ship types to include the super SC with 1 point torps (this was missing from list of valid ship types). M ./Vanilla/tools/xtkill.c -8 +5 ] [newbie-observer-ports.dpatch jimmyhua73 at yahoo.com**20060616103448 * docs/sample_ports added observer port definitions for newbie server. Added commentary to make it easier to configure the port configuration for a newbie server setup. ] [Chaos mode starbase enhancements williamb at its.caltech.edu**20060606200821 * orbit.c, transwarp.c: Allows starbases to transwarp to and dock with other bases if chaos mode is activated. ] [Twarp message fix williamb at its.caltech.edu**20060606200652 * transwarp.c: Fixes outdated reference to transwarp hours. ] [ATT and invalid ship fixes williamb at its.caltech.edu**20060603092650 * getentry.c, main.c: allow listing of ATT on features screen, and allow player to select ATT from entry window if ship is defined in sysdef as a valid ship. Also fixes incorrect error message in the case of invalid ship type. ] [null-terminate-mapchars-indentfix Stephen Thorne **20060614103104] [null-terminate-mapchars jimmyhua73 at yahoo.com**20060614105540 * robotd/struct.h modify mapchars to 3 characters to hold the NULL at the end * robotd/enter.c initialize final character to be NULL at the end when the robot first enters the game. ] [robotd-improved-army-tracking.dpatch jimmyhua73 at yahoo.com**20060613104425 * INSTALL.Newbie updated installation documentation to reflect changes in code. Also, CONFIRM=0 only works, CONFIRM=2 does not work. * INSTALL.Newbie added toggle robdc, assume robots don't carry. Also added lookahead=0 to emulate how robots were before Trent fixed the torp-dir bug. * robotd/data.c added extern int robdc (robots don't carry) * robotd/data.h extern int robdc defaults to not activated. * robotd/data.h added compiler define NO_PFORBIT, so robot doesn't depend on PFORBIT flag to determine if someone is picking armies or not. * robotd/dmessage.c added robdc in help. added robdc in messaging logic. * robotd/update_players.c commented out a continue; statement as the for loop gets exited too quickly sometimes. * robotd/update_players.c stale information of p->closest_pl is kept even when enemy becomes invisible. Will be used later. * robotd/update_players.c don't update last x or y if invisible. * robotd/update_players.c changes to check_orbit() function to make sure players is marked as orbiting a planet when cloaked near a planet, or invisible. * robotd/update_players.c changed some debug statements to make them more readable during a denemy debug session. * robotd/update_players.c army_check1() and army_check2() added logic so if robdc is activated, robot doesn't track fellow robot carriers. * robotd/update_players.c added some commentary so the army tracking code is more readble. Commented out a beam-down to friendly in favor of the more pessimistic possibility that the planet simply popped. ] [Cross-transwarp check williamb at its.caltech.edu**20060608223709 * transwarp.c: Prevent transwarping to a base that is already in transwarp. ] [post 2.11.1 release process notes quozl at us.netrek.org**20060601040643] [include config.guess in make dist quozl at us.netrek.org**20060601033548] [include config.sub in make dist quozl at us.netrek.org**20060601033011] [TAG 2.11.1 quozl at us.netrek.org**20060601025406] Patch bundle hash: ad8c7a64d470015a928cdbb7c12b3d90a4610d81 From quozl at us.netrek.org Wed Aug 9 02:22:59 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 9 Aug 2006 17:22:59 +1000 Subject: [netrek-dev] Bug with the geno parade In-Reply-To: References: <20060807020731.GB9254@us.netrek.org> Message-ID: <20060809072259.GA22982@us.netrek.org> Patch applied on continuum, should be effective after the next daemon restart. Current daemon pid is 734, for my notes. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From williamb at its.caltech.edu Mon Aug 21 21:55:22 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Mon, 21 Aug 2006 19:55:22 -0700 (PDT) Subject: [netrek-dev] darcs patch: Newbie server documentation update Message-ID: <20060822025522.3595B298C@bungi.sjc.warped.net> Mon Aug 21 19:53:22 PDT 2006 williamb at its.caltech.edu * Newbie server documentation update * INSTALL.Newbie - clarification of observer port vs player port, and pointer to robot command file M ./Vanilla/INSTALL.Newbie -1 +3 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13897 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060821/e7e8fc85/attachment.bin From williamb at its.caltech.edu Mon Aug 21 22:30:51 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Mon, 21 Aug 2006 20:30:51 -0700 (PDT) Subject: [netrek-dev] darcs patch: Newbie server documentation update2 Message-ID: <20060822033051.A5D11298C@bungi.sjc.warped.net> Mon Aug 21 20:28:23 PDT 2006 williamb at its.caltech.edu * Newbie server documentation update2 * INSTALL.Newbie - mention observer port, and point to robot command file M ./Vanilla/INSTALL.Newbie +3 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13790 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060821/746bbc52/attachment-0001.bin From williamb at its.caltech.edu Tue Aug 22 07:42:03 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 05:42:03 -0700 (PDT) Subject: [netrek-dev] darcs patch: Ban vote duration in sample sysdef Message-ID: <20060822124203.A0161298C@bungi.sjc.warped.net> Tue Aug 22 05:40:35 PDT 2006 williamb at its.caltech.edu * Ban vote duration in sample sysdef * (sample_sysdef.in): Adds BAN_VOTE_DURATION. M ./Vanilla/docs/sample_sysdef.in +5 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13827 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/ae09d096/attachment.bin From williamb at its.caltech.edu Tue Aug 22 10:18:29 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 08:18:29 -0700 (PDT) Subject: [netrek-dev] darcs patch: Adding vote tag to voting command structure Message-ID: <20060822151830.032DA298C@bungi.sjc.warped.net> Tue Aug 22 08:08:41 PDT 2006 williamb at its.caltech.edu * Adding vote tag to voting command structure * gencmds.h: Formalizes the definition of C_PR_INPICKUP, and adds a new tag C_PR_VOTE gencmds.c (do_help): Only list vote commands if VOTING is set in sysdef ntscmds.c (struct command_handler_2 nts_commands): Adds C_PR_VOTE tag to the vote commands. Removes redefinition of C_PR_INPICKUP, as this is now defined in gencmds.h M ./Vanilla/include/gencmds.h -6 +7 M ./Vanilla/ntserv/gencmds.c -1 +3 M ./Vanilla/ntserv/ntscmds.c -10 +8 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 15880 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/74c30c79/attachment-0001.bin From williamb at its.caltech.edu Tue Aug 22 10:28:28 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 08:28:28 -0700 (PDT) Subject: [netrek-dev] darcs patch: Remove ability to vote if VOTING=0 Message-ID: <20060822152828.AEBA7298C@bungi.sjc.warped.net> Tue Aug 22 08:25:04 PDT 2006 williamb at its.caltech.edu * Remove ability to vote if VOTING=0 * gencmds.c (check_2_command) If a command is tagged as a vote, voting must be turned on for the command to execute. This fixes a bug where if voting was off, vote commands could still be used, and they would pass with just 1 vote. M ./Vanilla/ntserv/gencmds.c +2 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13876 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/30dfc514/attachment.bin From williamb at its.caltech.edu Tue Aug 22 10:58:57 2006 From: williamb at its.caltech.edu (William Balcerski) Date: Tue, 22 Aug 2006 08:58:57 -0700 (PDT) Subject: [netrek-dev] 2 patches to CVS metaserver Message-ID: Submitted 2 patches to the metaserver CVS archive today. The first adds my client's RSA key to the rsa keyfile (metaserver gods had updated their keylist anyways, this just formalizes it in the source code). The second patch was to remove the default servers from the metarc file, which is the config file that is used on metaserver startup. All the servers on the list were defunct, and after consulting with Dave Ahn, we both came to agreement that the default list was unnecessary with the newer metaserver soliciation code. An alternative was to just list the two main servers (continuum and pickled) on the default list, but it seemed unnecessary as the metaserver already lists these servers just fine. Posting this here for discussion and input of metaserver maintainers. Carlos, James, your thoughts? Bill From williamb at its.caltech.edu Tue Aug 22 13:11:45 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 11:11:45 -0700 (PDT) Subject: [netrek-dev] darcs patch: Dogfight map file fix Message-ID: <20060822181145.CE925298C@bungi.sjc.warped.net> Tue Aug 22 10:59:51 PDT 2006 williamb at its.caltech.edu * Dogfight map file fix * marsdefs.h: Correctly defines mapfile (it no longer has the leading period in filename). M ./Vanilla/robots/marsdefs.h -1 +1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13723 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/535d67d5/attachment.bin From williamb at its.caltech.edu Tue Aug 22 15:55:43 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 13:55:43 -0700 (PDT) Subject: [netrek-dev] darcs patch: Improved tracking of server modes Message-ID: <20060822205543.EAA18298C@bungi.sjc.warped.net> Tue Aug 22 13:36:42 PDT 2006 williamb at its.caltech.edu * Improved tracking of server modes The purpose of this patch is to keep better track of what sort of robot mode the server is running, and to make consistent use of the server status states defined in struct.h. This makes the code easier to understand in some places (especially regarding the inl robot), and it allows for a smarter vote system, as votes will no longer pass if the server is already running the mode voted on. This enhances server stability in the case of rapid switching between modes (dogfight, hockey, basepractice, and inl). The server will no longer get "stuck" in a hockey galaxy, which has happened in the past when hockey was voted on twice. Likewise for getting "stuck" in dogfight mode. The initial startup robot mode, as defined in sysdef, is also recognized, and that mode is not able to be voted again until that robot exits. There should now never be the case where there are simultaneous duplicate robots, i.e. 2 hockey announcers, 2 SMACK basepractice starters, etc. * struct.h: Addition of GU_PUCK and GU_DOG server status. Addition of server mode defines. conquer.c, daemonII.c, death.c, getname.c, solicit.c, players.c: Replace compound bit statements with server mode defines. mars.c, marsmove.c, puck.c, puckmove.c: Track server status with new GU defines. ntscmds.c: Add check before launching puck, mars, newbie, or pre_t robots. M ./Vanilla/include/struct.h -4 +10 M ./Vanilla/ntserv/conquer.c -2 +2 M ./Vanilla/ntserv/daemonII.c -7 +7 M ./Vanilla/ntserv/death.c -1 +1 M ./Vanilla/ntserv/getname.c -1 +1 M ./Vanilla/ntserv/ntscmds.c -1 +21 M ./Vanilla/ntserv/solicit.c -10 +8 M ./Vanilla/robots/mars.c +1 M ./Vanilla/robots/marsmove.c -1 +1 M ./Vanilla/robots/puck.c +1 M ./Vanilla/robots/puckmove.c +1 M ./Vanilla/tools/players.c -1 +1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 19745 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/cd4da081/attachment-0001.bin From williamb at its.caltech.edu Tue Aug 22 17:04:04 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 15:04:04 -0700 (PDT) Subject: [netrek-dev] darcs patch: Addition of missing options to sample sysdef Message-ID: <20060822220404.28FBA298C@bungi.sjc.warped.net> Tue Aug 22 15:01:43 PDT 2006 williamb at its.caltech.edu * Addition of missing options to sample sysdef * sample_sysdef.in: Adds 4 options that were in sysdefaults but missing from sysdef. M ./Vanilla/docs/sample_sysdef.in +12 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 14062 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/4edc9327/attachment.bin From williamb at its.caltech.edu Tue Aug 22 17:29:08 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 15:29:08 -0700 (PDT) Subject: [netrek-dev] darcs patch: Fix so basepractice bots don't get ip blocked by dupli... Message-ID: <20060822222909.01358298C@bungi.sjc.warped.net> Tue Aug 22 15:27:19 PDT 2006 williamb at its.caltech.edu * Fix so basepractice bots don't get ip blocked by duplicate sysdef option * findslot.c (player_count_by_ip): No longer count base practice robots against player count from that IP address. M ./Vanilla/ntserv/findslot.c +1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13787 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/7a6c9f9b/attachment-0001.bin From williamb at its.caltech.edu Tue Aug 22 18:56:21 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Tue, 22 Aug 2006 16:56:21 -0700 (PDT) Subject: [netrek-dev] darcs patch: Basepractice server improvements Message-ID: <20060822235621.C225E298C@bungi.sjc.warped.net> Tue Aug 22 16:45:30 PDT 2006 williamb at its.caltech.edu * Basepractice server improvements These changes fix a bug where SMACK would ghostbust if sent a request to spawn enough bots. This patch also makes the basepractice server run right out of the box, rather than forcing the user to modify the basepdefs settings. * basepdefs.h: Removes running the bots remotely as the default setting, and adds a new define for the max number of bots (mirroring how newbiedefs.h is set up) * README.basep: Gives example of remote RCMD setting for those who would still want this information * basep.c (reaper(), do_start_robot(), startrobot()): Adds a counter for number of robots spawned. (startrobot()), do_start_robot(), startrobot()): Adds a counter for number of robots spawned. (startrobot()): Removes sleep() in favor of counter, and adds extra safety check if fork = -1, similar to what is done in newbie.c. (start_internal()): small formatting fix. M ./Vanilla/docs/README.basep -1 +1 M ./Vanilla/robots/basep.c -7 +12 M ./Vanilla/robots/basepdefs.h -2 +4 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 15667 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060822/72347b80/attachment.bin From quozl at us.netrek.org Tue Aug 22 19:16:48 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 23 Aug 2006 10:16:48 +1000 Subject: [netrek-dev] 2 patches to CVS metaserver In-Reply-To: References: Message-ID: <20060823001648.GA5172@us.netrek.org> Removed all the static entries from metarc, resulted in metaserver not starting, so put back netrek.hwy.com.au (as a test) and found it started fine. Maybe we need a patch for that. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From quozl at us.netrek.org Tue Aug 22 21:22:44 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 23 Aug 2006 12:22:44 +1000 Subject: [netrek-dev] call for review, fix to unsafe functions in signal handlers Message-ID: <20060823022244.GA21210@us.netrek.org> The attached patch is an attempt to fix some of the use of unsafe functions in the daemon. It also fixes it in basep, for comparison. Unsafe functions are those that may not be called in the context of a signal handler. The "man signal" page lists them. The existing code calls some of these functions from within the alarm signal handler move() in daemonII.c. Please review and comment. Testing has been limited ... a minute of play against "*" robots. The patch is also in my repository: http://james.tooraweenah.com/darcs/netrek-server/ My plan is to extend the feature to the remaining uses of SIGALRM in particular, and other signal functions as I locate them. I may also ponder the exitDaemon function, although this isn't as critical. Design features: - the use of SIGALRM is placed into a single file, alarm.c in ntserv/, with a new prototype file alarm.h in include/, - rather than executing the body of the processing in signal context, the main loop is altered so that a counter is incremented when a signal is received, - the pause(2) call in the main loop is augmented with a check of the counter, and at this point the function that used to be the signal handler is executed. [fix use of unsafe functions in signal handler, daemon, basep quozl at us.netrek.org**20060823014948 * alarm.c, alarm.h: merge common alarm signal handling functions. * basep.c, daemonII.c: use common functions and change main loop to execute always in non-signal context. ] -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ -------------- next part -------------- New patches: [fix use of unsafe functions in signal handler, daemon, basep quozl at us.netrek.org**20060823014948 * alarm.c, alarm.h: merge common alarm signal handling functions. * basep.c, daemonII.c: use common functions and change main loop to execute always in non-signal context. ] < > { addfile ./Vanilla/include/alarm.h hunk ./Vanilla/include/alarm.h 1 +void alarm_init(); +void alarm_set(); +void alarm_ignore(); +void alarm_prevent_inheritance(); +void alarm_handler(int signum); +void alarm_wait_for(); hunk ./Vanilla/ntserv/Makefile.in 16 # libnetrek object files -L_OBJS = balance.o bans.o bay.o \ +L_OBJS = alarm.o balance.o bans.o bay.o \ coup.o \ data.o db.o detonate.o distress.o \ enter.o \ addfile ./Vanilla/ntserv/alarm.c hunk ./Vanilla/ntserv/alarm.c 1 +#include +#include "defs.h" +#include "alarm.h" +#include INC_UNISTD + +/* alarm signal functions */ + +int alarm_count; + +void alarm_set(); +void alarm_handler(int signum); + +void alarm_init() +{ + alarm_count = 0; + alarm_set(); +} + +void alarm_set() +{ + (void) SIGNAL(SIGALRM, alarm_handler); +} + +void alarm_ignore() +{ + (void) SIGNAL(SIGALRM, SIG_IGN); +} + +void alarm_prevent_inheritance() +{ + (void) SIGNAL(SIGALRM, SIG_DFL); +} + +void alarm_handler(int signum) +{ + alarm_count++; + alarm_set(); +} + +void alarm_wait_for() +{ + while (1) { + PAUSE(SIGALRM); + if (alarm_count--) return; + } +} hunk ./Vanilla/ntserv/daemonII.c 20 #include "proto.h" #include "conquer.h" #include "daemon.h" +#include "alarm.h" #include INC_UNISTD #include INC_SYS_FCNTL hunk ./Vanilla/ntserv/daemonII.c 62 static void check_load(void); static int tournamentMode(void); static int check_scummers(int); -static void move(int ignored); +static void move(); static void udplayersight(void); static void udplayers(void); static void udplayerpause(void); hunk ./Vanilla/ntserv/daemonII.c 270 } #endif /*PUCK_FIRST*/ - (void) SIGNAL(SIGALRM, move); + alarm_init(); udt.it_interval.tv_sec = 0; udt.it_interval.tv_usec = reality; udt.it_value.tv_sec = 0; hunk ./Vanilla/ntserv/daemonII.c 287 x = 0; for (;;) { - PAUSE(SIGALRM); + alarm_wait_for(); + move(); if (debug) { if (!(++x % 50)) ERROR(1,("Mark %d\n", x)); hunk ./Vanilla/ntserv/daemonII.c 539 } } -static void move(int ignored) +static void move() { static int oldmessage; int old_robot; hunk ./Vanilla/ntserv/daemonII.c 551 TS_END } ts = TS_PICKUP; - /* Don't tell us it's time for another move in the middle of a move. */ - (void) SIGNAL(SIGALRM, SIG_IGN); - if (fuse(QUEUEFUSE)){ queues_purge(); solicit(0); hunk ./Vanilla/ntserv/daemonII.c 562 udplayerpause(); if (status->gameup & GU_CONQUER) conquer_update(); signal_servers(); - (void) SIGNAL(SIGALRM, move); return; } hunk ./Vanilla/ntserv/daemonII.c 716 if (fuse(CHECKLOADFUSE)) { check_load(); } - - (void) SIGNAL(SIGALRM, move); - - if (ignored) ; } hunk ./Vanilla/ntserv/daemonII.c 3466 fflush(stderr); } } - (void) SIGNAL(SIGALRM, SIG_IGN); /* ignore timer signal */ /* if problem occured before shared memory setup */ if (!players) hunk ./Vanilla/ntserv/daemonII.c 3973 (void) close(1); (void) close(2); } - (void) SIGNAL(SIGALRM, SIG_DFL); + alarm_prevent_inheritance(); argv[argc++] = "robot"; switch (team) { case FED: hunk ./Vanilla/ntserv/daemonII.c 4219 static void fork_robot(int robot) { if ((robot_pid=vfork()) == 0) { - (void) SIGNAL(SIGALRM, SIG_DFL); + alarm_prevent_inheritance(); switch(robot) { case NO_ROBOT: break; #ifdef BASEPRACTICE hunk ./Vanilla/ntserv/daemonII.c 4437 if (puckwait) { - SIGNAL(SIGALRM, do_nuttin); semop(pucksem_id, pucksem_op, 1); hunk ./Vanilla/ntserv/daemonII.c 4438 - SIGNAL(SIGALRM, SIG_IGN); } } #endif /*PUCK_FIRST*/ hunk ./Vanilla/robots/basep.c 31 #include "struct.h" #include "data.h" #include "proto.h" +#include "alarm.h" #include "roboshar.h" #include "basepdefs.h" hunk ./Vanilla/robots/basep.c 77 void cleanup(int); -void checkmess(int); +void checkmess(); int rprog(char *login, char *monitor); void start_internal(); void exitRobot(); hunk ./Vanilla/robots/basep.c 86 void startrobot(int num, char *s, char *h, char *log, int dg, int base, int def); void fix_planets(); -void -reaper(sig) - int sig; +static void reaper(int sig) { int stat=0; hunk ./Vanilla/robots/basep.c 89 - static int pid; + int pid; while ((pid = WAIT3(&stat, WNOHANG, 0)) > 0) ; HANDLE_SIG(SIGCHLD,reaper); hunk ./Vanilla/robots/basep.c 117 do_message_post_set(check_command); strcpy(robot_host,REMOTEHOST); readsysdefaults(); - SIGNAL(SIGALRM, checkmess); /*the def signal is needed - MK */ + alarm_init(); if (!debug) SIGNAL(SIGINT, cleanup); hunk ./Vanilla/robots/basep.c 155 status->gameup |= GU_CHAOS; status->gameup |= GU_PRACTICE; - /* Robot is signalled by the Daemon */ - ERROR(3,("\nRobot Using Daemon Synchronization Timing\n")); - me->p_process = getpid(); me->p_timerdelay = HOWOFTEN; hunk ./Vanilla/robots/basep.c 164 me->p_status = PALIVE; /* Put robot in game */ while (1) { - PAUSE(SIGALRM); + alarm_wait_for(); + checkmess(); } } hunk ./Vanilla/robots/basep.c 169 -void checkmess(int unused) +void checkmess() { int shmemKey = PKEY; hunk ./Vanilla/robots/basep.c 173 - HANDLE_SIG(SIGALRM,checkmess); me->p_ghostbuster = 0; /* keep ghostbuster away */ if (me->p_status != PALIVE){ /*So I'm not alive now...*/ ERROR(2,("ERROR: Smack died??\n")); hunk ./Vanilla/robots/basep.c 456 */ if (fork() == 0) { - SIGNAL(SIGALRM, SIG_DFL); + alarm_prevent_inheritance(); execl("/bin/sh", "sh", "-c", command, (char *) NULL); perror("basep'execl"); _exit(1); hunk ./Vanilla/robots/basep.c 490 argv[argc] = NULL; if (fork() == 0) { - SIGNAL(SIGALRM, SIG_DFL); + alarm_prevent_inheritance(); execv(Robot,argv); perror(Robot); _exit(1); hunk ./Vanilla/robots/basep.c 532 void exitRobot() { - SIGNAL(SIGALRM, SIG_IGN); if (me != NULL && me->p_team != ALLTEAM) { if (target >= 0) { messAll(255,roboname, "I'll be back."); } Context: [Addition of missing options to sample sysdef, review quozl at us.netrek.org**20060822234537] [Addition of missing options to sample sysdef williamb at its.caltech.edu**20060822220143 * sample_sysdef.in: Adds 4 options that were in sysdefaults but missing from sysdef. M ./Vanilla/docs/sample_sysdef.in +12 ] [Adding vote tag to voting command structure williamb at its.caltech.edu**20060822150841 * gencmds.h: Formalizes the definition of C_PR_INPICKUP, and adds a new tag C_PR_VOTE gencmds.c (do_help): Only list vote commands if VOTING is set in sysdef ntscmds.c (struct command_handler_2 nts_commands): Adds C_PR_VOTE tag to the vote commands. Removes redefinition of C_PR_INPICKUP, as this is now defined in gencmds.h M ./Vanilla/include/gencmds.h -6 +7 M ./Vanilla/ntserv/gencmds.c -1 +3 M ./Vanilla/ntserv/ntscmds.c -10 +8 ] [Remove ability to vote if VOTING=0 williamb at its.caltech.edu**20060822152504 * gencmds.c (check_2_command) If a command is tagged as a vote, voting must be turned on for the command to execute. This fixes a bug where if voting was off, vote commands could still be used, and they would pass with just 1 vote. M ./Vanilla/ntserv/gencmds.c +2 ] [Dogfight map file fix williamb at its.caltech.edu**20060822175951 * marsdefs.h: Correctly defines mapfile (it no longer has the leading period in filename). M ./Vanilla/robots/marsdefs.h -1 +1 ] [Ban vote duration in sample sysdef, review quozl at us.netrek.org**20060822232047 * docs/sample_sysdef.in: add back lost text caused by my editing sample_sysdef instead of sample_sysdef.in. ] [Ban vote duration in sample sysdef williamb at its.caltech.edu**20060822124035 * (sample_sysdef.in): Adds BAN_VOTE_DURATION. M ./Vanilla/docs/sample_sysdef.in +5 ] [Improved tracking of server modes, review quozl at us.netrek.org**20060822231413] [Improved tracking of server modes williamb at its.caltech.edu**20060822203642 The purpose of this patch is to keep better track of what sort of robot mode the server is running, and to make consistent use of the server status states defined in struct.h. This makes the code easier to understand in some places (especially regarding the inl robot), and it allows for a smarter vote system, as votes will no longer pass if the server is already running the mode voted on. This enhances server stability in the case of rapid switching between modes (dogfight, hockey, basepractice, and inl). The server will no longer get "stuck" in a hockey galaxy, which has happened in the past when hockey was voted on twice. Likewise for getting "stuck" in dogfight mode. The initial startup robot mode, as defined in sysdef, is also recognized, and that mode is not able to be voted again until that robot exits. There should now never be the case where there are simultaneous duplicate robots, i.e. 2 hockey announcers, 2 SMACK basepractice starters, etc. * struct.h: Addition of GU_PUCK and GU_DOG server status. Addition of server mode defines. conquer.c, daemonII.c, death.c, getname.c, solicit.c, players.c: Replace compound bit statements with server mode defines. mars.c, marsmove.c, puck.c, puckmove.c: Track server status with new GU defines. ntscmds.c: Add check before launching puck, mars, newbie, or pre_t robots. M ./Vanilla/include/struct.h -4 +10 M ./Vanilla/ntserv/conquer.c -2 +2 M ./Vanilla/ntserv/daemonII.c -7 +7 M ./Vanilla/ntserv/death.c -1 +1 M ./Vanilla/ntserv/getname.c -1 +1 M ./Vanilla/ntserv/ntscmds.c -1 +21 M ./Vanilla/ntserv/solicit.c -10 +8 M ./Vanilla/robots/mars.c +1 M ./Vanilla/robots/marsmove.c -1 +1 M ./Vanilla/robots/puck.c +1 M ./Vanilla/robots/puckmove.c +1 M ./Vanilla/tools/players.c -1 +1 ] [Newbie server documentation update2 williamb at its.caltech.edu**20060822032823 * INSTALL.Newbie - mention observer port, and point to robot command file M ./Vanilla/INSTALL.Newbie +3 ] [comindico whitelist removal, quozl specific quozl at us.netrek.org**20060818020653] [noted new bug, signal handler calls unsafe functions quozl at us.netrek.org**20060818002307] [initial design of checkpointing quozl at us.netrek.org**20060817015947 * PROJECTS.checkpointing: an initial design for checkpointing support that should allow live changes to code. ] [add ban tools quozl at us.netrek.org**20060815042103 * tools/ban.c: add tool to display ban list, ban a player from command line, dump the list, and reload the list. * tools/Makefile.in: add new ban program. ] [add ban vote duration quozl at us.netrek.org**20060815031242 * include/data.h, ntserv/data.c, include/sysdefaults.h: add new BAN_VOTE_DURATION sysdef option. * ntserv/main.c, ntscmds.c, Makefile.in, proto.h, bans.c: move ban logic into one source file. * daemonII.c: every minute, age the temporary bans. ] [add live daemon release target quozl at us.netrek.org**20060809070952 * ntserv/Makefile.in: add target to release a new daemon, though it does not replace the running daemon. That's an idea for later. ] [fix test to correctly reproduce parade ring overlap quozl at us.netrek.org**20060809055741] [fix for conquer parade alignment, alternate quozl at us.netrek.org**20060809043954 * ntserv/conquer.c (conquer_ships_ring, conquer_parade): add a counter for calculating ring coordinates rather than using player list position. ] [add test for conquer parade slot alignment bug quozl at us.netrek.org**20060808054700 * tests/parade-bug-2006-08-07: a test to try to reproduce the bug reported by Niclas where iggy slots end up in the same screen position as player slots. ] [add planet orbit and take test scripts quozl at us.netrek.org**20060808054456 * tools/setplanet.c: add be-orbited-by and be-taken-by test actions, for use by test scripts. They cheat, and are therefore not intended for production use. ] [minor indentation fixes prior to review quozl at us.netrek.org**20060808002418 * ntserv/conquer.c: tabify, some added lines lacked tabs, made it inconsistent. ] [Semi-critical update fix williamb at its.caltech.edu**20060622022126 * socket.c (updateClient): clarifies purpose of packet type check against 0x40, adds check for SP_S_YOU case. ] [Show geno messages for observers williamb at its.caltech.edu**20060622013521 * genspkt.c (sndSelf and sndSSelf): Factorized check for whether packet should be marked as critical. (check_sendself_critical): New function. Player status (via sndPStatus) is sent before player whydead (via sndSelf or sndSSelf). When whydead changes, the packet must be marked as critical in order for that information to arrive first, so that observers can get a proper whydead message upon genocide. This was previously done for just sndSelf, but with this patch, both sndSelf and sndSSelf now do it, and observers get geno messages with short packets on. ] [Formatting fix for if statement in interface.c williamb at its.caltech.edu**20060707151641 * interface.c: (do_refit). Fixes if statement split over 3 lines. ] [Command file for PreT robots williamb at its.caltech.edu**20060707152531 * robots/pret.c: (start_a_robot) Adds the ability to read in a command file, as per the command file defined in pretdefs.h, but which was unused for whatever reason. Note that both the newbie server and basepractice server are set to use the same file, defined as COMFILE in pretdefs.h, basepdefs.h, and newbiedefs.h. As these modes are mutually exclusive, it is ok for them to read in robot commands from the same commands file. M ./Vanilla/robots/pret.c -1 +3 ] [adjust test scripts for xtkill changes quozl at us.netrek.org**20060710014703 * tests: some scripts used "xtkill k" repeatedly to grant kills, changed to use the additional parameter. Note that this additional parameter is not immediately after the option, like it is with T or t options. ] [Xtkill settable kills williamb at its.caltech.edu**20060707153051 * xtkill.c (main): Adds the ability to specify the number of kills to increment the player, identical to how the increment armies option works, rather than just adding +1 kill per use of the xtkill k option. M ./Vanilla/tools/xtkill.c -2 +5 ] [Xtkill bug fixes williamb at its.caltech.edu**20060623040057 * xtkill.c (Usage): Added 2 missing options (u and H) to options list. (main): Removed call to getshipdefaults(), as this data was already in memory, and it had the unintended consequence of erasing any modifications to ship values that were set in the sysdef file, forcing a sysdef reload every time xtkill was used. ] [robotd-carriage-return-added-to-death-messages.dpatch jimmyhua73 at yahoo.com**20060630092932 * robotd/death.c in function death(), I added newline character to the reason of death on all mprintf statements "\n", so it displays properly in debug mode. ] [freebsd compilation fix, missing header quozl at us.netrek.org**20060705062726 * ntserv/main.c: add signal.h include, after a report from a FreeBSD user showed that my enthusiastic trimming of headers had broken compilation on other operating systems. ] [avoid lies to metaserver due pre-t robots quozl at us.netrek.org**20060703021915 * solicit.c: count PFBPROBOT slots as being free, since we expect them to back off and quit if a player arrives, so that the metaserver report of players properly excludes pre-t robots. ] [further-fixes-to-war-decs.dpatch jimmyhua73 at yahoo.com**20060702153128 This completes the fixes I started with war declarations. Basically, war is declared when 1. t-mode starts. 2. bot is forced to switch teams Further peace is declared when: 3. everytime you take out a new ship. This should cover all scenarios in a typical pickup game. Tested by having robots join a bronco style game. 1 Kli, 4 feds, 4 Roms. Check war decs. Have the 1 kli get forced to join one of the t-mode teams. Check war decs Have Feds get timercided, and get forced to join Klis. Check war decs. Wait till Roms cause a genocide (Roms will take a neutral planet!). Then games continues as Rom vs. Kli, and check war decs. Changelog here: * robotd/update_players.c changed declare_intents() function so that it will return success or failure codes. Also, changed function so that you may declare peace only, by doing declare_intents(1). * robotd/decide.c added static int needswardec in function decide() so that robot can track when t-mode dies off and starts up again. * robotd/decide.c added in function decide() logic so, declare_intents(0) function gets called when t-mode just starts up. * robotd/decide.c modified in function decide() other calls to declare_intents() so that they conform to the extra parameter passing * robotd/robot.c added comment in function s_recharge() a peace request never gets called when robot orbits a planet it originally wanted to refuel from * robotd/robot.c in function find_safe_planet() fixed some buggy logic which allowed robots to head towards hostile planets to refuel/repair. * robotd/robot.c in function reset_r_info() modified call to declare_intents() to conform to newly modified function. ] [continuum ghostbust diagnostics quozl at us.netrek.org**20060630025545 * daemonII.c (ghostmess): add reason for ghostbust to message, and increase logging of normal ghostbust timeout in ERRORS. ] [untabify daemon main quozl at us.netrek.org**20060630022904 * daemonII.c: removed all tabs using untabify in emacs. ] [newbie robots war declarations test quozl at us.netrek.org**20060630020843] [Newbie robots now declare war properly in pickup games quozl at us.netrek.org**20060630011431 Derived from Jimmy Huang's patch of the same name. * robotd/data.c: fixed comment misspelling in int delay. delay for declaring war. * robotd/decide.c (decide): added some comments to help me follow the code better * robotd/main.c (main): fixed up indentation of variable declarations. Added switchedteams variable. Modified main() function so that when a team switch occurs, declare_intents() gets called after choosing a new ship. * robotd/robot.c (reset_r_info): added some commentary on the declare_intents() call, which only gets something done only if someone sends a reset command to the robot. * robotd/robot.c (send_initial): removed commented code of declare_intents(). This was a bug workaround, robot sends a dummy packet so it doesn't get ghostbusted. Doesn't seem needed anymore. * robotd/update_players.c (declare_intents): added commentary on how this function is supposed to work. Function will now properly declare war on the 2 teams with the most players that isn't the same team as yourself. And then declares peace with everyone else. ] [continuum ban vote tweaks 2006-06 quozl at us.netrek.org**20060622015354 Following review of continuum recording 2006-06-07-22-00: - require four votes to ban instead of two, to defeat ban scumming, - expire ban votes within two minutes instead of ten, - expire eject votes within five minutes instead of ten. ] [xtkill ship change fixes williamb at its.caltech.edu**20060620005009 * tools/xtkill.c: Adds the ability to set ship to galaxy class, removes unneccessary ship size change for ATT, and updates the list of valid ship types to include the super SC with 1 point torps (this was missing from list of valid ship types). M ./Vanilla/tools/xtkill.c -8 +5 ] [newbie-observer-ports.dpatch jimmyhua73 at yahoo.com**20060616103448 * docs/sample_ports added observer port definitions for newbie server. Added commentary to make it easier to configure the port configuration for a newbie server setup. ] [Chaos mode starbase enhancements williamb at its.caltech.edu**20060606200821 * orbit.c, transwarp.c: Allows starbases to transwarp to and dock with other bases if chaos mode is activated. ] [Twarp message fix williamb at its.caltech.edu**20060606200652 * transwarp.c: Fixes outdated reference to transwarp hours. ] [ATT and invalid ship fixes williamb at its.caltech.edu**20060603092650 * getentry.c, main.c: allow listing of ATT on features screen, and allow player to select ATT from entry window if ship is defined in sysdef as a valid ship. Also fixes incorrect error message in the case of invalid ship type. ] [null-terminate-mapchars-indentfix Stephen Thorne **20060614103104] [null-terminate-mapchars jimmyhua73 at yahoo.com**20060614105540 * robotd/struct.h modify mapchars to 3 characters to hold the NULL at the end * robotd/enter.c initialize final character to be NULL at the end when the robot first enters the game. ] [robotd-improved-army-tracking.dpatch jimmyhua73 at yahoo.com**20060613104425 * INSTALL.Newbie updated installation documentation to reflect changes in code. Also, CONFIRM=0 only works, CONFIRM=2 does not work. * INSTALL.Newbie added toggle robdc, assume robots don't carry. Also added lookahead=0 to emulate how robots were before Trent fixed the torp-dir bug. * robotd/data.c added extern int robdc (robots don't carry) * robotd/data.h extern int robdc defaults to not activated. * robotd/data.h added compiler define NO_PFORBIT, so robot doesn't depend on PFORBIT flag to determine if someone is picking armies or not. * robotd/dmessage.c added robdc in help. added robdc in messaging logic. * robotd/update_players.c commented out a continue; statement as the for loop gets exited too quickly sometimes. * robotd/update_players.c stale information of p->closest_pl is kept even when enemy becomes invisible. Will be used later. * robotd/update_players.c don't update last x or y if invisible. * robotd/update_players.c changes to check_orbit() function to make sure players is marked as orbiting a planet when cloaked near a planet, or invisible. * robotd/update_players.c changed some debug statements to make them more readable during a denemy debug session. * robotd/update_players.c army_check1() and army_check2() added logic so if robdc is activated, robot doesn't track fellow robot carriers. * robotd/update_players.c added some commentary so the army tracking code is more readble. Commented out a beam-down to friendly in favor of the more pessimistic possibility that the planet simply popped. ] [Cross-transwarp check williamb at its.caltech.edu**20060608223709 * transwarp.c: Prevent transwarping to a base that is already in transwarp. ] [post 2.11.1 release process notes quozl at us.netrek.org**20060601040643] [include config.guess in make dist quozl at us.netrek.org**20060601033548] [include config.sub in make dist quozl at us.netrek.org**20060601033011] [TAG 2.11.1 quozl at us.netrek.org**20060601025406] Patch bundle hash: b004a7cc48e579fc5ff46cbdb2c3c0f5781a02d5 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060823/34dd92a6/attachment-0001.pgp From stephen.thorne at gmail.com Tue Aug 22 21:32:23 2006 From: stephen.thorne at gmail.com (Stephen Thorne) Date: Wed, 23 Aug 2006 12:32:23 +1000 Subject: [netrek-dev] call for review, fix to unsafe functions in signal handlers In-Reply-To: <20060823022244.GA21210@us.netrek.org> References: <20060823022244.GA21210@us.netrek.org> Message-ID: <3e8ca5c80608221932w5c3978aeh529fe64abd6716b5@mail.gmail.com> On 8/23/06, James Cameron wrote: > The attached patch is an attempt to fix some of the use of unsafe > functions in the daemon. It also fixes it in basep, for comparison. For correctness, "int alarm_count;" should be "sig_atomic_t alarm_count;". -- Stephen Thorne "Give me enough bandwidth and a place to sit and I will move the world." --Jonathan Lange From netrek at gmail.com Tue Aug 22 21:36:42 2006 From: netrek at gmail.com (Zach) Date: Tue, 22 Aug 2006 22:36:42 -0400 Subject: [netrek-dev] call for review, fix to unsafe functions in signal handlers In-Reply-To: <20060823022244.GA21210@us.netrek.org> References: <20060823022244.GA21210@us.netrek.org> Message-ID: Just curious how the old code allowed for unsafe conditions? Any code example/test case I can examine for learning purposes? Zach From quozl at us.netrek.org Wed Aug 23 05:16:31 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 23 Aug 2006 20:16:31 +1000 Subject: [netrek-dev] call for review, fix to unsafe functions in signal handlers In-Reply-To: <3e8ca5c80608221932w5c3978aeh529fe64abd6716b5@mail.gmail.com> References: <20060823022244.GA21210@us.netrek.org> <3e8ca5c80608221932w5c3978aeh529fe64abd6716b5@mail.gmail.com> Message-ID: <20060823101631.GB12569@us.netrek.org> On Wed, Aug 23, 2006 at 12:32:23PM +1000, Stephen Thorne wrote: > For correctness, "int alarm_count;" should be "sig_atomic_t > alarm_count;". Thanks, I've taken this. I've propragated the SIGALRM changes to the other robots and done a few tests without any problems observed. When it came to propagate the changes to ntserv, the main loop wasn't just a simple pause(2), it was a select(2). This introduces the well-known race condition. See man select ... "Suppose the signal handler sets a global flag and returns. Then a test of this global flag followed by a call of select() could hang indefinitely if the signal arrived just after the test but just before the call." In the case of ntserv, the select had a timeout, so people may have seen occasional two-second pauses when this happens. The popular solution I've seen in other projects is a signal pipe, which is a fifo into which the signal number is written when the signal handler is called. The select then includes the fifo on the list of file descriptors to monitor. This is implemented now, look at ntserv/sigpipe.c in my repo, and the changes to ntserv/input.c (the main event loop). -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From williamb at its.caltech.edu Wed Aug 23 10:16:44 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Wed, 23 Aug 2006 08:16:44 -0700 (PDT) Subject: [netrek-dev] darcs patch: Standardize planet locs for basepractice Message-ID: <20060823151644.BF4C8298C@bungi.sjc.warped.net> Wed Aug 23 08:13:16 PDT 2006 williamb at its.caltech.edu * Standardize planet locs for basepractice * basep.c (fix_planets): Calls setplanet to reset planet locations to standard settings, to be consistent with how other robot modes set up their galaxy. In some cases, the base practice server could be launched in an odd galaxy configuration, such as hockey or dogfight, depending on the voting history of the server. * puck.c: Minor formatting fix. M ./Vanilla/robots/basep.c +5 M ./Vanilla/robots/puck.c -1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 20743 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060823/1f102033/attachment-0001.bin From williamb at its.caltech.edu Wed Aug 23 18:47:21 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Wed, 23 Aug 2006 16:47:21 -0700 (PDT) Subject: [netrek-dev] darcs patch: Pret queue renumbering Message-ID: <20060823234721.975FE298C@bungi.sjc.warped.net> Wed Aug 23 16:37:38 PDT 2006 williamb at its.caltech.edu * Pret queue renumbering * struct.h: Renumbers PreT queue so it's not defined the same as the newbie queue, this was causing the newbie server to report the queue as being the pret queue. M ./Vanilla/include/struct.h -4 +4 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 20737 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060823/eb379114/attachment.bin From netrek at gmail.com Wed Aug 23 19:17:03 2006 From: netrek at gmail.com (Zach) Date: Wed, 23 Aug 2006 20:17:03 -0400 Subject: [netrek-dev] testing changes? Message-ID: Hello, If I make changes to ntserv/daemonII.c how can I get this to compile to test that my code changes at least will compile. I know to test functionality I must run the build script and state the server, but I'd like to have to way to just compile daemonII.c to facilitate my debugging. Zach From williamb at its.caltech.edu Wed Aug 23 20:19:50 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Wed, 23 Aug 2006 18:19:50 -0700 (PDT) Subject: [netrek-dev] darcs patch: Ingame admin tool fixes Message-ID: <20060824011950.52869298C@bungi.sjc.warped.net> Wed Aug 23 18:18:32 PDT 2006 williamb at its.caltech.edu * Ingame admin tool fixes * autogen.sh: chmod admin scripts to executable * ntscmds.c (do_admin): fixes path to admin scripts M ./Vanilla/autogen.sh +1 M ./Vanilla/ntserv/ntscmds.c -5 +5 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 21332 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060823/22759c50/attachment-0001.bin From quozl at us.netrek.org Thu Aug 24 07:58:26 2006 From: quozl at us.netrek.org (James Cameron) Date: Thu, 24 Aug 2006 22:58:26 +1000 Subject: [netrek-dev] darcs patch: Pret queue renumbering In-Reply-To: <20060823234721.975FE298C@bungi.sjc.warped.net> References: <20060823234721.975FE298C@bungi.sjc.warped.net> Message-ID: <20060824125826.GA29331@us.netrek.org> On Wed, Aug 23, 2006 at 04:47:21PM -0700, williamb at its.caltech.edu wrote: > +#define QU_PRET_DMN 16 /* Pre-T server daemon */ Note this requires MAXQUEUE to be set to 17. I've pushed a patch to do this into my repo. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From williamb at its.caltech.edu Thu Aug 24 19:27:40 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Thu, 24 Aug 2006 17:27:40 -0700 (PDT) Subject: [netrek-dev] darcs patch: Increase newbie slots from 8 to 16 Message-ID: <20060825002741.02BCE298C@bungi.sjc.warped.net> Thu Aug 24 10:36:29 PDT 2006 williamb at its.caltech.edu * Increase newbie slots from 8 to 16 * queue.c: Previous patch that reassigned newbie queue to different defines than pre-t queue made it so the max # of players decreased from 16 to 8, this patch restores newbie queue status to be identical to pret queue status. M ./Vanilla/ntserv/queue.c -3 +3 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 23458 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060824/fab6a966/attachment.bin From williamb at its.caltech.edu Thu Aug 24 21:32:17 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Thu, 24 Aug 2006 19:32:17 -0700 (PDT) Subject: [netrek-dev] darcs patch: Sysdefault instructions correction Message-ID: <20060825023217.A03E1298C@bungi.sjc.warped.net> Thu Aug 24 19:31:11 PDT 2006 williamb at its.caltech.edu * Sysdefault instructions correction * sysdefaults.h: Point to .in file for sample sysdef additions. M ./Vanilla/include/sysdefaults.h -1 +1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 23014 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060824/bf9d22a0/attachment-0001.bin From williamb at its.caltech.edu Thu Aug 24 22:40:28 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Thu, 24 Aug 2006 20:40:28 -0700 (PDT) Subject: [netrek-dev] darcs patch: Sysdefault instructions correction Message-ID: <20060825034028.1CAB3298C@bungi.sjc.warped.net> Thu Aug 24 19:31:11 PDT 2006 williamb at its.caltech.edu * Sysdefault instructions correction * sysdefaults.h: Point to .in file for sample sysdef additions. M ./Vanilla/include/sysdefaults.h -1 +1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 23014 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060824/c44444af/attachment.bin From williamb at its.caltech.edu Thu Aug 24 23:07:47 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Thu, 24 Aug 2006 21:07:47 -0700 (PDT) Subject: [netrek-dev] darcs patch: Move newbie slot control to sysdef Message-ID: <20060825040747.E1CF9298C@bungi.sjc.warped.net> Thu Aug 24 20:58:22 PDT 2006 williamb at its.caltech.edu * Move newbie slot control to sysdef This patch moves control of the number of robots and players allowed in the newbie server, from the newbiedefs file, to sysdef. It also adds an improved tracking method of the number of in game robots. * sample_sysdef.in, data.h, data.c, sysdefaults.h: Adds MAX_NEWBIE_PLAYERS and MAX_NEWBIE_ROBOTS. * newbiedefs.h: Removes slot control defines. * newbie.c (totalRobots()): New function. Replaces nb_robots counter. checkmess(): Adds check against player and robot counts before starting/stopping bots. M ./Vanilla/docs/sample_sysdef.in +6 M ./Vanilla/include/data.h +2 M ./Vanilla/include/sysdefaults.h +5 M ./Vanilla/ntserv/data.c +2 M ./Vanilla/robots/newbie.c -8 +27 M ./Vanilla/robots/newbiedefs.h -5 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 25854 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060824/98018d4d/attachment-0001.bin From williamb at its.caltech.edu Thu Aug 24 23:18:17 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Thu, 24 Aug 2006 21:18:17 -0700 (PDT) Subject: [netrek-dev] darcs patch: Merlin responds to help Message-ID: <20060825041817.59B01298C@bungi.sjc.warped.net> Thu Aug 24 21:17:00 PDT 2006 williamb at its.caltech.edu * Merlin responds to help * newbie.c: Have Merlin responds to being sent help, as the other robots such as SMACK and Kathy do. M ./Vanilla/robots/newbie.c +14 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 23505 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060824/6ac8b69f/attachment.bin From williamb at its.caltech.edu Fri Aug 25 16:56:53 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Fri, 25 Aug 2006 14:56:53 -0700 (PDT) Subject: [netrek-dev] darcs patch: Robot server spam reduction Message-ID: <20060825215653.A40DF298C@bungi.sjc.warped.net> Fri Aug 25 14:54:11 PDT 2006 williamb at its.caltech.edu * Robot server spam reduction * basepdefs.h/newbiedefs.h/pretdefs.h: Changes default welcome message from 2 to 10 minutes to cut down on spam. * newbie.c: Provides a working link to the newbie manual. M ./Vanilla/robots/basepdefs.h -1 +1 M ./Vanilla/robots/newbie.c -1 +1 M ./Vanilla/robots/newbiedefs.h -1 +1 M ./Vanilla/robots/pretdefs.h -1 +1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 25403 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060825/7992b882/attachment.bin From williamb at its.caltech.edu Fri Aug 25 18:24:45 2006 From: williamb at its.caltech.edu (William Balcerski) Date: Fri, 25 Aug 2006 16:24:45 -0700 (PDT) Subject: [netrek-dev] call for review, fix to unsafe functions in signal handlers In-Reply-To: <20060823022244.GA21210@us.netrek.org> References: <20060823022244.GA21210@us.netrek.org> Message-ID: The new alarm handlers are causing instability in both the pret and newbie processes. Kathy/Merlin will ghostbust sometime between a new player logging in, and the terminating of one of the robots. With newbie, it was inconsistent as to when Merlin would crash. However with preT, Kathy crashes upon the first login attempt in which the game is at 4v4 condition, with 1 human and 3 bots on one team, and 4 bots on the other. Unapplied the patch which modified pret, and stability was fine. Will monitor newbie stability as well, so far it is stable with the patch unapplied. Bill On Wed, 23 Aug 2006, James Cameron wrote: > The attached patch is an attempt to fix some of the use of unsafe > functions in the daemon. It also fixes it in basep, for comparison. > > Unsafe functions are those that may not be called in the context of a > signal handler. The "man signal" page lists them. The existing code > calls some of these functions from within the alarm signal handler > move() in daemonII.c. > > Please review and comment. > > Testing has been limited ... a minute of play against "*" robots. > > The patch is also in my repository: > http://james.tooraweenah.com/darcs/netrek-server/ > > My plan is to extend the feature to the remaining uses of SIGALRM in > particular, and other signal functions as I locate them. I may also > ponder the exitDaemon function, although this isn't as critical. > > Design features: > > - the use of SIGALRM is placed into a single file, alarm.c in ntserv/, > with a new prototype file alarm.h in include/, > > - rather than executing the body of the processing in signal context, > the main loop is altered so that a counter is incremented when a > signal is received, > > - the pause(2) call in the main loop is augmented with a check of the > counter, and at this point the function that used to be the signal > handler is executed. > > [fix use of unsafe functions in signal handler, daemon, basep > quozl at us.netrek.org**20060823014948 > > * alarm.c, alarm.h: merge common alarm signal handling functions. > > * basep.c, daemonII.c: use common functions and change main loop to > execute always in non-signal context. > > ] > > -- > James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ > From quozl at us.netrek.org Fri Aug 25 20:31:41 2006 From: quozl at us.netrek.org (James Cameron) Date: Sat, 26 Aug 2006 11:31:41 +1000 Subject: [netrek-dev] call for review, fix to unsafe functions in signal handlers In-Reply-To: References: <20060823022244.GA21210@us.netrek.org> Message-ID: <20060826013141.GA6067@us.netrek.org> Please obtain a backtrace of the processes that fail. Use the bt command in gdb. Use gdb against either a running process before it fails, or against a core file. I've reviewed the alarm changes ... they reduce concurrency which should increase stability of the code ... but they may expose latent flaws. We may have to fix these. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From williamb at its.caltech.edu Sun Aug 27 23:46:27 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Sun, 27 Aug 2006 21:46:27 -0700 (PDT) Subject: [netrek-dev] darcs patch: Basepractice unused variable removed Message-ID: <20060828044627.D6B38298C@bungi.sjc.warped.net> Sun Aug 27 21:44:59 PDT 2006 williamb at its.caltech.edu * Basepractice unused variable removed * basep.c: removes unused max_player definition, if it were to be added in the future, it would be in basepdefs.h anyways. M ./Vanilla/robots/basep.c -3 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 25168 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060827/ab18ef52/attachment.bin From williamb at its.caltech.edu Mon Aug 28 00:14:30 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Sun, 27 Aug 2006 22:14:30 -0700 (PDT) Subject: [netrek-dev] darcs patch: Newbie enhancements part1 - cleanup, debug Message-ID: <20060828051430.64F07298C@bungi.sjc.warped.net> Sun Aug 27 22:02:44 PDT 2006 williamb at its.caltech.edu * Newbie enhancements part1 - cleanup, debug This patch cleans up newbie.c by removing some unused variables, making some small format fixes, and adding debugging info as is seen in pret.c. The purpose of this patch and the next patches I will submit are to make newbie.c and pret.c as similar as possible, at which point I can then look to factorize as much code as possible into common functions. As this is a larger project, I'm breaking it down into smaller chunks, by adding features to newbie.c that are done better in pret.c, and vice versa. * newbie.c: debugTarget and debugLevel added to provide debug output to monitor number of bots and humans in game. Code similar to that in pret.c. start_a_robot routine: added safety check in case robot team not selected properly totalPlayers(): new function, code similar to pret.c, used in debug output Fixed typo in commands file instructions. Removed unused variables and unneeded comments M ./Vanilla/robots/newbie.c -19 +61 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 29311 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060827/bcdc4ec3/attachment-0001.bin From williamb at its.caltech.edu Mon Aug 28 02:07:09 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Mon, 28 Aug 2006 00:07:09 -0700 (PDT) Subject: [netrek-dev] darcs patch: Pret enhancements part1 - cleanup, debug Message-ID: <20060828070709.C257B298C@bungi.sjc.warped.net> Sun Aug 27 23:59:56 PDT 2006 williamb at its.caltech.edu * Pret enhancements part1 - cleanup, debug This patch removes unneeded comments, makes some format fixes, and removes an internal function for sending debug output to any slot. This function was unsafe, as it could be used maliciously to send spam debug output. It also prevented messages like "help" from being sent to Kathy. * pret.c: checkMessage function removed. Extra long output lines split into 2 lines for readability. Minor format fixes, and unneeded commented out code removed. M ./Vanilla/robots/pret.c -62 +19 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 29685 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060828/aae81541/attachment-0001.bin From williamb at its.caltech.edu Mon Aug 28 13:05:20 2006 From: williamb at its.caltech.edu (williamb at its.caltech.edu) Date: Mon, 28 Aug 2006 11:05:20 -0700 (PDT) Subject: [netrek-dev] darcs patch: Install directions on running multiple servers Message-ID: <20060828180520.ECBA7298C@bungi.sjc.warped.net> Mon Aug 28 11:04:21 PDT 2006 williamb at its.caltech.edu * Install directions on running multiple servers * INSTALL: add a section on how to run 2 instances of a server on 1 machine. M ./Vanilla/INSTALL +13 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 25906 bytes Desc: A darcs patch for your repository! Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060828/e06791da/attachment.bin From quozl at us.netrek.org Mon Aug 28 19:29:41 2006 From: quozl at us.netrek.org (James Cameron) Date: Tue, 29 Aug 2006 10:29:41 +1000 Subject: [netrek-dev] call for review, fix to unsafe functions in signal handlers In-Reply-To: References: <20060823022244.GA21210@us.netrek.org> Message-ID: <20060829002941.GA4969@us.netrek.org> This ended up being a counting flaw in alarm_wait_for(), and has been fixed. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From quozl at us.netrek.org Tue Aug 29 00:05:06 2006 From: quozl at us.netrek.org (James Cameron) Date: Tue, 29 Aug 2006 15:05:06 +1000 Subject: [netrek-dev] testing changes? In-Reply-To: References: Message-ID: <20060829050506.GA23340@us.netrek.org> On Wed, Aug 23, 2006 at 08:17:03PM -0400, Zach wrote: > If I make changes to ntserv/daemonII.c how can I get this to compile > to test that my code changes at least will compile. ./configure --prefix=/your/server/test/path make make install cd ntserv loop: vi daemonII.c # make edits as you choose make make install # start client goto loop This is true of almost any software package. Details vary, but the general idea is the same. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From netrek at gmail.com Tue Aug 29 15:08:50 2006 From: netrek at gmail.com (Zach) Date: Tue, 29 Aug 2006 16:08:50 -0400 Subject: [netrek-dev] testing changes? In-Reply-To: <20060829050506.GA23340@us.netrek.org> References: <20060829050506.GA23340@us.netrek.org> Message-ID: On 8/29/06, James Cameron wrote: > > This is true of almost any software package. Details vary, but the > general idea is the same. I see. Thanks. Because you've already done the autoconf setup work this process is possible right? Otherwise I'd have to setup some stuff on my own to get the configure script built and generate the makefiles. Zach From netrek at gmail.com Tue Aug 29 15:33:40 2006 From: netrek at gmail.com (Zach) Date: Tue, 29 Aug 2006 16:33:40 -0400 Subject: [netrek-dev] Reactions to Raymond? Message-ID: TUX Desktop Watch -- August 29, 2006 _________________________________________________________________ Welcome to the TUX Desktop Watch This Week: The Quote Heard 'Round the Community "No matter how painful, no matter how ugly, we must enable the Linux desktop to run Windows media, to support iPods. We may not want binary programs in user-space, but we must have them." Eric Raymond, author of "The Cathedral and the Bazaar" in a panel discussion at Linux World 2006. I would encourage everyone to search for more information on the discussion and the background. Of course, it is nothing new to readers of TUX and TUX Desktop Watch. I've been talking all around the subjects which are the foundation for his remarks. The Register was the first to break the story and you can find their report here: http://www.theregister.co.uk/2006/08/17/eric_raymond_linux_compromise/. It's funny how we filter information. We each bring to every bit of information every experience that makes us unique. When we add new information to that unique mixture of experiences, it becomes like chemistry. There are interactions between our experiences and the new information, those reactions often form what we take the new information to "mean". So it is with Raymond's comments. We all read or heard what he had to say and then like chemistry we arrive at our reactions (our conclusions). For me, I think that Raymond is spot on some of this conclusions. Now I'll admit his conclusions about the switch from 32- to 64-bit technology and the closing window for Linux are areas I've not considered. But I see in his comments one critical conclusion. In his book The Cathedral and the Bazaar, Raymond documented his first hand experience with what makes the Open-Source software development process work. In my opinion, no one can begin to understand what makes Open Source different, special, and mysterious without reading his book. So I believe he is uniquely qualified to have voiced what he did. So I believe Raymond sees a disconnect between what we all want Linux to become and what the developers working on Linux want. For TUX and our readers, we want a Linux that just works, but Linux developers don't really care what we want. Now I'm talking about the vast majority of individual developers who contribute to Linux and not the corporate interests of Linspire, Xandros, or Novell. From the other perspective many within that same development community believe that Linux represents everything that the ideals of the Free Software Foundation proclaim. They believe that Linux should always reflect those ideals and should never be diluted with software that does not guarantee the free software ideals. Many people first encountering Linux ask questions like Raymond proposes,"does it work with my iPod?" After telling many college students here in Puerto Rico about LInux, a very common question was, "does it run Windows Messenger?" To which I was like, mouth gaping, saying to myself "don't you mean does it support connecting to the Windows messenger service?" From both perspectives we have a gap, (I know here he goes again with the gap crap again...) that are uncrossable. So I believe that Raymond has recognized that the two ends have no way to meet in the middle, so he made his call to the Linux community to make the effort to meet the users where it is most important to them. Whether that compromise is drivers, or codecs, or whatever, the community must move the mountain to where the users are. It's the only way! Raymond knows it and whether everyone else cares, it is the only way to reach widespread Linux desktop adoption. Otherwise, we have a great deal of cool content for you this week, which you can find below. We have plenty of great Weblog entries, plus a chapter on compiling and installing source code from the book SUSE Linux by Chris Brown from O'Reilly Media. We wish you much learning enjoyment! With best regards, Kevin Shockey Editor in Chief, TUX Magazine From quozl at us.netrek.org Tue Aug 29 17:03:19 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 30 Aug 2006 08:03:19 +1000 Subject: [netrek-dev] Reactions to Raymond? In-Reply-To: References: Message-ID: <20060829220319.GB6159@us.netrek.org> Hmm, iPod interface to Netrek? What is the significance for the project? -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From quozl at us.netrek.org Tue Aug 29 17:05:15 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 30 Aug 2006 08:05:15 +1000 Subject: [netrek-dev] testing changes? In-Reply-To: References: <20060829050506.GA23340@us.netrek.org> Message-ID: <20060829220515.GF6159@us.netrek.org> On Tue, Aug 29, 2006 at 04:08:50PM -0400, Zach wrote: > I see. Thanks. Because you've already done the autoconf setup work > this process is possible right? No, it's really GNU Make that makes this all possible. The autoconf is not at all contributing to the process; it is only a portability wrapper to adjust the Makefiles for different environs. The Makefile.in files are pretty static. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From netrek at gmail.com Tue Aug 29 17:58:48 2006 From: netrek at gmail.com (Zach) Date: Tue, 29 Aug 2006 18:58:48 -0400 Subject: [netrek-dev] Reactions to Raymond? In-Reply-To: <20060829220319.GB6159@us.netrek.org> References: <20060829220319.GB6159@us.netrek.org> Message-ID: On 8/29/06, James Cameron wrote: > Hmm, iPod interface to Netrek? What is the significance for the > project? Heh would that be feasible? Is there embedded Linux that Vanilla could run on? Zach From netrek at gmail.com Tue Aug 29 17:59:40 2006 From: netrek at gmail.com (Zach) Date: Tue, 29 Aug 2006 18:59:40 -0400 Subject: [netrek-dev] testing changes? In-Reply-To: <20060829220515.GF6159@us.netrek.org> References: <20060829050506.GA23340@us.netrek.org> <20060829220515.GF6159@us.netrek.org> Message-ID: On 8/29/06, James Cameron wrote: > > No, it's really GNU Make that makes this all possible. The autoconf is > not at all contributing to the process; it is only a portability wrapper > to adjust the Makefiles for different environs. The Makefile.in files > are pretty static. Oh I see. So if you were creating a new project from the ground up and no source files had yet been written what process would you follow? Zach From stephen.thorne at gmail.com Wed Aug 30 04:37:23 2006 From: stephen.thorne at gmail.com (Stephen Thorne) Date: Wed, 30 Aug 2006 19:37:23 +1000 Subject: [netrek-dev] testing changes? In-Reply-To: References: <20060829050506.GA23340@us.netrek.org> <20060829220515.GF6159@us.netrek.org> Message-ID: <3e8ca5c80608300237w3ddf472escf1e6b9cb19c2314@mail.gmail.com> On 8/30/06, Zach wrote: > Oh I see. So if you were creating a new project from the ground up and > no source files had yet been written what process would you follow? You would ask somewhere else. -- Stephen Thorne "Give me enough bandwidth and a place to sit and I will move the world." --Jonathan Lange From quozl at us.netrek.org Wed Aug 30 04:59:01 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 30 Aug 2006 19:59:01 +1000 Subject: [netrek-dev] Reactions to Raymond? In-Reply-To: References: <20060829220319.GB6159@us.netrek.org> Message-ID: <20060830095901.GB6290@us.netrek.org> On Tue, Aug 29, 2006 at 06:58:48PM -0400, Zach wrote: > Heh would that be feasible? Is there embedded Linux that Vanilla could > run on? Vanilla will run on an embedded Linux, as I've already demonstrated with OpenWRT. Did you miss the announcement? I think it is still on netrek.org or the netrek-dev archives. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From quozl at us.netrek.org Wed Aug 30 04:57:10 2006 From: quozl at us.netrek.org (James Cameron) Date: Wed, 30 Aug 2006 19:57:10 +1000 Subject: [netrek-dev] testing changes? In-Reply-To: References: <20060829050506.GA23340@us.netrek.org> <20060829220515.GF6159@us.netrek.org> Message-ID: <20060830095710.GA6290@us.netrek.org> On Tue, Aug 29, 2006 at 06:59:40PM -0400, Zach wrote: > Oh I see. So if you were creating a new project from the ground up and > no source files had yet been written what process would you follow? Netrek isn't a new project from the ground up, so your question isn't relevant to the development team. The process you would follow is called software engineering. There isn't room or time to describe this to you ... go check out Wikipedia and academic reference books. No specific recommendations. It depends on the code. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/ From netrek at gmail.com Thu Aug 31 22:47:08 2006 From: netrek at gmail.com (Zach) Date: Thu, 31 Aug 2006 23:47:08 -0400 Subject: [netrek-dev] files Message-ID: ntserv/getpath.c: sprintf(ConqFile,"%s/%s",localstatedir,N_CONQFILE); trying to understand why this is necessary and what it does, i looked up fprintf() and that writes the arguments to the stream which is FooFile in this case, it seems this is done for every file that is used for reading/writing. localestatedir is some sort of envirnopnment variable defined by configure so not sure why/how this is being used and FooFile is defined as "conquer" , so CongFile will point to /var/lib/netrek/conquer is that correct? i am adding file and so trying understand what steps to take properly zach