(start_server): Call it. Move initialization stuff to it, with error
checking added.
(market_update): Internal linkage.
/* thread entry points */
void delete_lostitems(void *);
-void market_update(void *);
+void market_init(void);
void mobility_check(void *);
void player_kill_idle(void *);
void update_main(void);
"MobilityCheck", "Writes the timestamp file", 0);
}
- if (opt_MARKET) {
- empth_create(PP_TIMESTAMP, market_update, (50 * 1024), flags,
- "MarketUpdate", "Updates the market", 0);
- }
-
+ market_init();
update_init();
}
#include "empthread.h"
#include "file.h"
+#include "optlist.h"
#include "player.h"
#include "prototypes.h"
#include "server.h"
}
/*ARGSUSED*/
-void
+static void
market_update(void *unused)
{
time_t now;
}
/*NOTREACHED*/
}
+
+void
+market_init(void)
+{
+ if (!opt_MARKET)
+ return;
+ if (!empth_create(PP_TIMESTAMP, market_update, 50 * 1024, 0,
+ "MarketUpdate", "Updates the market", NULL))
+ exit_nomem();
+}