1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
|
|
4 | * Copyright (©) 2017,2018 Marc Alexander Lehmann / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
8 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
156 | void |
157 | void |
157 | init_globals () |
158 | init_globals () |
158 | { |
159 | { |
159 | if (settings.logfilename[0] == 0) |
160 | if (settings.logfilename[0] == 0) |
160 | log_setfd (-1); |
161 | log_setfd (-1); |
161 | else |
162 | else |
162 | { |
163 | { |
163 | int logfd = open (settings.logfilename, O_CREAT|O_WRONLY|O_APPEND, 0666); |
164 | int logfd = open (settings.logfilename, O_CREAT|O_WRONLY|O_APPEND, 0666); |
164 | |
165 | |
165 | if (logfd >= 0) |
166 | if (logfd >= 0) |
166 | log_setfd (logfd); |
167 | log_setfd (logfd); |