Commit graph

1200 commits

Author SHA1 Message Date
Marc Olzheim
84bc824f65 Change 0 to NULL for pointer initializations. No functional changes. 2005-08-22 18:52:43 +00:00
Ron Koenderink
a7fa7dee30 (io_output_all,update_main,update_wait): Do not block on writing when
aborting commands for an update.  Move update_pending to the start of
the update sequence where the commands are aborted.
2005-08-21 17:17:38 +00:00
Ron Koenderink
ef0dbf6790 (force): Change to create update thread instead of calling
empth_sleep() as the empth_sleep() can not be aborted for an update.
(update_force): New.
2005-08-20 19:16:56 +00:00
Ron Koenderink
22456c4965 [_WIN32]: Use pconfig.obj instead of pconfig.o for ntpconfig: 2005-08-13 20:18:37 +00:00
Marc Olzheim
76fb0253d6 Update for src/lib/subs/attsub.c:1.28 and src/lib/update/revolt.c:1.16 2005-08-11 09:29:10 +00:00
Marc Olzheim
ea056014a5 Update for src/lib/subs/pr.c:1.27 2005-08-11 09:28:20 +00:00
Ron Koenderink
ce11addeed (empth_yield): Remove sleep(). Delay not necessary. 2005-08-01 03:08:16 +00:00
66e30e2c8e Update to current output format. 2005-07-31 17:45:06 +00:00
9bf3b1b64a (show_opts): New, factored out of vers(). Fix output punctuation.
(vers): Fix output punctuation and grammar.
2005-07-31 17:42:14 +00:00
9c3bb663c8 (wrgamesdef): Don't point to ftp.wolfpackempire.com, it does not work. 2005-07-31 17:40:06 +00:00
786b34c693 (SHIPNAMES, opt_SHIPNAMES, Options, carg, name, sorde, qorde)
(show_sail, shi, att_get_combat, pr_com, satdisp, satmap, prship):
Remove nooption SHIPNAMES.
2005-07-31 17:22:32 +00:00
df8845199e (sorde): Output messed up for ships with sail path. Fix and
simplify.  Remove inappropriate ship sanity check, should be done
elsewhere, and differently.

(qorde): Fix the previous rev.
2005-07-31 16:35:30 +00:00
4c37776458 (qorde): Output messed up for ships with sail path. Fix and
simplify.  Remove inappropriate ship sanity check, should be done
elsewhere, and differently.
2005-07-31 16:19:03 +00:00
591c82bf7c (checksect, give_back_cap, guerrilla): No longer change capital to
agribusiness.  That was done when the occupier abandons the old-owners
capital or it revolts, to prevent players from sacking the same
capital many timers.  The server has a much better way to prevent that
since 4.2.7, so this weird hack is no longer useful.  Thanks to Pat
Loney for pointing this out.
2005-07-31 13:55:50 +00:00
Ron Koenderink
fd81bf86eb (meltitems): Remove unnecessary checks. 2005-07-25 13:12:22 +00:00
Ron Koenderink
7920252986 (meltitems): Move melt_item_denom into the ichr structure. 2005-07-24 22:20:05 +00:00
Ron Koenderink
193b7fdbad (prmptrd,uprmptrd): Remove unused variable cp. 2005-07-24 17:26:21 +00:00
Ron Koenderink
c0a43eb872 (getcommand): Remove unused variable i 2005-07-24 17:24:21 +00:00
2248c07024 (lwpReschedule): Internal function, move declaration from lwp.h to
lwpint.h.
2005-07-24 10:00:52 +00:00
4e9066c894 (empth_yield) [_EMPTH_LWP]: Blocked the current thread forever; fix. 2005-07-24 09:57:39 +00:00
Ron Koenderink
02693bb59b (prompt,dopipe) [_WIN32]: Enable the pipe capability. 2005-07-23 21:44:00 +00:00
380b063f9c Remove some redundant parenthesis; no functional change. 2005-07-23 19:48:35 +00:00
4861f837fb (player_init) [LISTENMAXCONN]: Comment seems to claim Linux doesn't
have SOMAXCONN, but has LISTENMAXCONN.  In fact, it has SOMAXCONN, and
LISTENMAXCONN doesn't exist anywhere in /usr/include or the Internet.
Remove the special case.
2005-07-23 19:12:23 +00:00
c9cc4e3cab (rpt): Restore tabular formatting destroyed by emp-indent. 2005-07-23 19:09:12 +00:00
c41c45be61 Delete some code that has been disabled out for ages and looks
useless or wrong.
2005-07-23 18:35:07 +00:00
4bfb66a255 (empth_create): Adjust stack size to at least PTHREAD_STACK_MIN, not
PTHREAD_STACK_MIN + 1.
2005-07-23 17:50:31 +00:00
565faa8891 Cleanup, no functional change.
(empth_t, empth_sem_t): Define as incomplete types in empthread.h,
complete in pthread.c, to avoid exposing implementation details.

(EMPTH_KILLED): Move from empthread.h to pthread.c.
2005-07-23 17:40:49 +00:00
59c15ea9d4 [_DECTHREADS_] Drop support for DECthreads d4, a.k.a. DCE threads,
which are obsolete since at least 1997.

(empth_terminate, empth_wakeup) [__ppc__]: Ancient versions of OS X
lacked pthread_kill().  As a work-around, its use was disabled here
for all versions of OS X.  The work-around could lead to hangs.
Remove it and drop support for ancient versions of OS X.

(empth_create) [__linux__]: Linux has supported thread attribute
stacksize for ages.  Remove the special case.

(_MIT_POSIX_THREADS): Unused, remove.
2005-07-23 17:26:20 +00:00
bf61ce9f38 (empth_setctx): Unused, remove. 2005-07-23 16:55:31 +00:00
e15b7e2b9a (trade_desc, get_materials): Use i_type variable instead of int for
iterating over item types.
2005-07-23 16:53:06 +00:00
022685c47c (sell): Prompting for `amount' is confusing: is it the amount of goods
to offer or amount of money to ask for?.  Ask for `quantity' instead.
2005-07-23 16:50:43 +00:00
be1147e7f0 (bdes): Prompt was messed up when bmap contained designation 0. 2005-07-23 16:47:08 +00:00
8cc53c1c2b (status): Internal linkage. 2005-07-23 16:41:18 +00:00
Ron Koenderink
968501cf00 Fix lrangeedit to lrange. Fix rangeedit to range. Fix attack to Attacking.
Add html links for info references.  Remove inconsistent periods.
Add missing closing brackets. Change info to information to improve
readability.  Improve the readability for range/lrange sentence.
2005-07-23 13:58:11 +00:00
Ron Koenderink
6484e52678 (stre): Fix to make it match what happens in attack sequence: land
units do not react to a mountain.

(stre): Add an empth_yield() per sector to make the server responsive
to other players as this command is CPU intensive.
2005-07-23 13:44:47 +00:00
Ron Koenderink
2a12333ecb (player_init) [_WIN32,__linux__ && __alpha__]: Remove the
SO_REUSEADDR socket option as it is not required for WIN32.
In WIN32, there is no waiting time when a port is closed before
it can be reused so SO_REUSEADDR is not required for WIN32.
Leave the option has a undesirable effect of allowing a second
server instance to start without an error and leaving both
instances running.  ALPHA and LINUX do support SO_REUSEADDR.
2005-07-23 13:43:35 +00:00
Ron Koenderink
db6fd8dad2 (player_main): Add empth_yield() in the command processing loop to ensure
after every command, other players gets a chance to execute a command.
This prevents denial of service attack that monopolizing the active server
thread by continuing feeding data to the server from a client.
2005-07-23 13:37:36 +00:00
Ron Koenderink
e332ff5fcc (launch_sat): Incorrectly assumed that plane_mob_max is 127 when
calculating when the satellite will be ready for use.
2005-07-18 23:52:30 +00:00
eba5db4bf0 Final batch of 4.2.21 changes. 2005-07-16 18:00:05 +00:00
d8e3ae7c11 Only of historical interest. 2005-07-13 18:02:46 +00:00
70febfab9f Document new files. 2005-07-13 18:01:02 +00:00
16e8d95c21 (melt_item_denom): i_type shift (include/item.h 1.12) broke
initializer, screwing up fallout damage.
2005-07-13 17:33:39 +00:00
23ee946206 Still more 4.2.21 changes. 2005-07-09 14:06:13 +00:00
4d25aa9f03 (pln_equip): Fix the previous rev. 2005-07-09 13:59:01 +00:00
f7b444721b (mission_pln_equip, pln_equip): Fix the previous rev. 2005-07-09 13:32:54 +00:00
c7a372c782 Doc fix. 2005-07-09 11:09:34 +00:00
Ron Koenderink
c0d009758c (show_sect_capab, mission_pln_equip, pln_equip): Change i_type
references to use I_NONE instead of zero.  Zero has been invalid since
item.h rev. 1.12, and was questionable style before.
2005-07-07 21:57:15 +00:00
Marc Olzheim
c6262a209c Update for src/lib/subs/pr.c:1.25 2005-07-06 09:14:20 +00:00
8754dc0124 Still more 4.2.21 changes. 2005-07-05 16:14:09 +00:00
Ron Koenderink
42a3ce3958 (pr_player, upr_player): Blocking I/O on another player's struct iop *
is unsafe!  By the time the blocked thread wakes up, that player may
be gone, along with its struct iop *, and io_write() follows a
dangling pointer.  Moreover, at most one thread may use empth_select()
on the same file descriptor.  Violations of that restriction cause
threads to hang under Windows since ntthread.c rev. 1.15.  Make all
output to another player non-blocking for now.  Historically, player
threads sent output only to their socket, though their own iop.  This
was broken by flash and asynchronous telegram notification a long time
ago.
2005-07-04 14:07:31 +00:00