]> granicus.if.org Git - ngircd/log
ngircd
13 years agoLog "Can't read MOTD file" as "configuration error"
Alexander Barton [Tue, 18 Jan 2011 22:44:07 +0000 (23:44 +0100)]
Log "Can't read MOTD file" as "configuration error"

Now this error message is displayed in the console without debug prefix
when running the configuration test (--configtest).

13 years agoAllow "Port = 0" in [Server] blocks
Alexander Barton [Tue, 18 Jan 2011 21:45:01 +0000 (22:45 +0100)]
Allow "Port = 0" in [Server] blocks

Port number 0 marks remote servers that try to connect to this
daemon, but where this daemon never tries to establis a connection
on its own: only incoming connections are allowed.

13 years agoconf: fix 'Value of "..." is not a number!' for negative values
Alexander Barton [Tue, 18 Jan 2011 21:41:27 +0000 (22:41 +0100)]
conf: fix 'Value of "..." is not a number!' for negative values

Don't use isdigit() function any more, because it only checks the
first character of the variable value and because it doesn't know
about the minus sign which is required e.g. for "Group = -1".

13 years agoDon't read MOTD file twice
Alexander Barton [Tue, 18 Jan 2011 21:01:27 +0000 (22:01 +0100)]
Don't read MOTD file twice

The MOTD file is read in Read_Config(), so don't read it when handling
the "MotdFile" configuration variable. Instead make sure that it is
initialized properly when (re-)reading the configuration.

13 years agoAdd [Features] section to ngircd-test{1|2}.conf
Alexander Barton [Tue, 18 Jan 2011 20:39:48 +0000 (21:39 +0100)]
Add [Features] section to ngircd-test{1|2}.conf

Fix commit 5a34bb203a:
It is not enough to strip the "No" prefix from "Ident" and "PAM",
but we have to introduce the new [Features] section to fix all
warning messages of ngIRCd.

Variables "Ident" and "PAM" in [Global] are completely wrong :-(

13 years agoEnable WHOIS command to return information about services
Alexander Barton [Tue, 18 Jan 2011 20:04:55 +0000 (21:04 +0100)]
Enable WHOIS command to return information about services

13 years agoUpdate testsuite configuration: strip No... prefixes
Alexander Barton [Tue, 18 Jan 2011 13:28:39 +0000 (14:28 +0100)]
Update testsuite configuration: strip No... prefixes

13 years agoAdd connection/socket information to some log messages
Alexander Barton [Sun, 16 Jan 2011 22:24:41 +0000 (23:24 +0100)]
Add connection/socket information to some log messages

13 years agoImplement channel mode 'O': "IRC operators only"
Alexander Barton [Mon, 10 Jan 2011 11:15:05 +0000 (12:15 +0100)]
Implement channel mode 'O': "IRC operators only"

This channel mode is used on DALnet (bahamut), for example.

13 years agoRemove ZeroConf variable from sample-ngircd.conf
Alexander Barton [Sun, 9 Jan 2011 23:10:01 +0000 (00:10 +0100)]
Remove ZeroConf variable from sample-ngircd.conf

13 years agoRemove support for ZeroConf/Bonjour/Rendezvous service registration
Alexander Barton [Sun, 9 Jan 2011 22:51:30 +0000 (23:51 +0100)]
Remove support for ZeroConf/Bonjour/Rendezvous service registration

13 years agoTOPIC command: test for channel admin rights correctly
Alexander Barton [Sun, 9 Jan 2011 22:08:15 +0000 (23:08 +0100)]
TOPIC command: test for channel admin rights correctly

This enables other servers, services and IRC operators to change
channel topics, even when the client is not joined to this channel.

Now the handler for TOPIC behaves like the one for MODE.

13 years agoChannel_CheckAdminRights(): test if client can admin a channel
Alexander Barton [Sun, 9 Jan 2011 21:40:11 +0000 (22:40 +0100)]
Channel_CheckAdminRights(): test if client can admin a channel

This generic function tests if a client is allowed to do administrative
tasks to a specific channel:

 - servers and services are always truested ("allowed everything"),
 - channel operators are allowed,
 - IRC operarors are allowed if OperCanUseMode is set in the config.

13 years agoconf: fix 'unknown section' FEATURES parse error
Florian Westphal [Sun, 9 Jan 2011 21:19:17 +0000 (22:19 +0100)]
conf: fix 'unknown section' FEATURES parse error

pointed out by Alex:
ngircd.conf, line 105: Unknown section "[Features]"!

13 years agoIRC_TOPIC(): code cleanup
Alexander Barton [Sun, 9 Jan 2011 15:23:33 +0000 (16:23 +0100)]
IRC_TOPIC(): code cleanup

13 years agoconf: move 'run-time-feature-disable' options to new FEATURE section
Florian Westphal [Sun, 9 Jan 2011 18:42:42 +0000 (19:42 +0100)]
conf: move 'run-time-feature-disable' options to new FEATURE section

13 years agoarray: remove check for allocated == 0
Florian Westphal [Sun, 9 Jan 2011 18:40:54 +0000 (19:40 +0100)]
array: remove check for allocated == 0

allocated can only be zero if ->mem is NULL.

13 years agoarray: remove alignment of requested size
Florian Westphal [Sun, 9 Jan 2011 18:28:50 +0000 (19:28 +0100)]
array: remove alignment of requested size

libc should know better than us.
Also, this helps debugging with tools like valgrind:
When you allocate an array of size x, and then erronoulsy
use x+1 valgrind cannot detect the bug because due to ALIGN_()
made by array.c we might have allocated more than size x...

13 years agoconf: Warn if PAM=true when ngircd was built without PAM support
Florian Westphal [Sun, 9 Jan 2011 17:17:35 +0000 (18:17 +0100)]
conf: Warn if PAM=true when ngircd was built without PAM support

13 years agoconf: add missing static qualifier
Florian Westphal [Sun, 9 Jan 2011 16:54:21 +0000 (17:54 +0100)]
conf: add missing static qualifier

internal helper, so it should be static.

also, add UNUSED to 'Line'.

13 years agoUpdate copyright notices for 2010 :)
Alexander Barton [Sun, 9 Jan 2011 15:11:12 +0000 (16:11 +0100)]
Update copyright notices for 2010 :)

And update the NEWS and ChangeLog file as well.

13 years agoMake NoZeroConf option work with Howl
Alexander Barton [Sun, 9 Jan 2011 13:31:18 +0000 (14:31 +0100)]
Make NoZeroConf option work with Howl

13 years agoconfig: deprecate NoXX-Options
Florian Westphal [Sat, 8 Jan 2011 14:56:14 +0000 (15:56 +0100)]
config: deprecate NoXX-Options

ngircd unfortunately uses several options using double-negation, e.g.

NoIdent = No, NoPam = No, etc.

This renames all options by dropping the "No" prefix, e.g.
"NoIdent = no" becomes "Ident = yes".

The old options will continue to work, but will cause a warning
message.

Also update man pages and default config.

To prevent silly
'Ident = yes' from appearing in  --configtest output in the
'ident support not compiled in and Ident Option not used' case,
make default value depend on feature availability.
If feature is available, enable by default, otherwise disable.

We might consider moving these options to a new
[Feature]

section, or something like that, because none of these options are
essential.

Another possible improvement:

'Ident = yes' option in ngircd.conf causes a warning if ngircd was
built without ident support.

This does not happen with e.g. zeroconf....

14 years agochannel: fix confusing "adding to invite list" debug output
Florian Westphal [Fri, 31 Dec 2010 10:32:20 +0000 (11:32 +0100)]
channel: fix confusing "adding to invite list" debug output

adding entries to ban list produced 'invite list' debug output...

14 years agoCommand throttling: introduce MAX_COMMANDS_SERVICE
Alexander Barton [Wed, 29 Dec 2010 13:19:51 +0000 (14:19 +0100)]
Command throttling: introduce MAX_COMMANDS_SERVICE

New MAX_COMMANDS_SERVICE (currently set to MAX_COMMANDS_SERVER[10]),
so that services are handled like servers (and not regular users).

14 years agoDon't throttle services and servers beeing registered
Alexander Barton [Wed, 29 Dec 2010 13:12:34 +0000 (14:12 +0100)]
Don't throttle services and servers beeing registered

14 years agoXcode: correctly sort files
Alexander Barton [Wed, 29 Dec 2010 13:11:40 +0000 (14:11 +0100)]
Xcode: correctly sort files

14 years agoDon't assert() when serching a client for an invalid server token
Alexander Barton [Fri, 24 Dec 2010 11:48:03 +0000 (12:48 +0100)]
Don't assert() when serching a client for an invalid server token

This is only relevant when a trusted server on a server-server link
sends invalid commands.

14 years agongIRCd release 17.1 rel-17.1
Alexander Barton [Sun, 19 Dec 2010 14:59:00 +0000 (15:59 +0100)]
ngIRCd release 17.1

14 years ago--configtest: remember if MOTD is configured by file or phrase
Alexander Barton [Thu, 2 Dec 2010 15:51:21 +0000 (16:51 +0100)]
--configtest: remember if MOTD is configured by file or phrase

Configuration variables "MotdFile" and "MotdPhrase" are mutually
exclusive; so don't display content in both of them when running
"ngircd --configtest": instead remember which one is beeing used.

14 years agoEnhance log messages when establishing server links a little bit
Alexander Barton [Thu, 2 Dec 2010 12:40:08 +0000 (13:40 +0100)]
Enhance log messages when establishing server links a little bit

14 years agoReset ID of outgoing server link on DNS error correctly
Alexander Barton [Thu, 2 Dec 2010 12:38:42 +0000 (13:38 +0100)]
Reset ID of outgoing server link on DNS error correctly

Not resetting the ID prevents the daemon from trying to re-establish
outgoing server links when the DNS resolver failed to resole a hostname.

14 years agoDon't log critical (or worse) messages to stderr
Alexander Barton [Thu, 2 Dec 2010 12:36:19 +0000 (13:36 +0100)]
Don't log critical (or worse) messages to stderr

stderr isn't redirected to the "error file" any more, so there is
no point in trying to log to it ...

14 years agoManual page ngircd(8): add SIGNALS section
Alexander Barton [Wed, 1 Dec 2010 21:04:28 +0000 (22:04 +0100)]
Manual page ngircd(8): add SIGNALS section

14 years agoManual pages: update and simplyfy AUTHORS section
Alexander Barton [Wed, 1 Dec 2010 21:04:01 +0000 (22:04 +0100)]
Manual pages: update and simplyfy AUTHORS section

14 years agoRemove "error file" when compiled with debug code enabled
Alexander Barton [Wed, 1 Dec 2010 20:22:20 +0000 (21:22 +0100)]
Remove "error file" when compiled with debug code enabled

The information written to the "error file" (/tmp/ngircd-<PID>.err) when
ngIRCd is compiled with debug code enabled isn't that usefule, so don't
create this file at all.

14 years agoREADME: Updated list of implemented commands
Alexander Barton [Fri, 19 Nov 2010 20:35:25 +0000 (21:35 +0100)]
README: Updated list of implemented commands

14 years agoadd doc/README-Interix.txt and doc/Bopm.txt to distribution tarball
Alexander Barton [Mon, 15 Nov 2010 19:11:16 +0000 (20:11 +0100)]
add doc/README-Interix.txt and doc/Bopm.txt to distribution tarball

14 years agoMerge branch 'numeric-329'
Alexander Barton [Mon, 15 Nov 2010 18:36:21 +0000 (19:36 +0100)]
Merge branch 'numeric-329'

* numeric-329:
  New numeric 329: get channel creation time on "MODE #chan" commands
  Save channel creation time; new function Channel_CreationTime()

14 years agoadd doc/PAM.txt to distribution tarball
Florian Westphal [Sun, 14 Nov 2010 22:15:43 +0000 (23:15 +0100)]
add doc/PAM.txt to distribution tarball

doc/PAM.txt was not included in the release tarball.
reported by Christoph Biedl.

14 years agoNew numeric 329: get channel creation time on "MODE #chan" commands
Alexander Barton [Thu, 11 Nov 2010 11:39:49 +0000 (12:39 +0100)]
New numeric 329: get channel creation time on "MODE #chan" commands

14 years agoSave channel creation time; new function Channel_CreationTime()
Alexander Barton [Thu, 11 Nov 2010 11:39:19 +0000 (12:39 +0100)]
Save channel creation time; new function Channel_CreationTime()

14 years agongIRCd release 17 rel-17
Alexander Barton [Sun, 7 Nov 2010 16:24:07 +0000 (17:24 +0100)]
ngIRCd release 17

14 years agoUpdated doc/Platforms.txt for upcoming release 17
Alexander Barton [Sun, 7 Nov 2010 16:20:28 +0000 (17:20 +0100)]
Updated doc/Platforms.txt for upcoming release 17

14 years agocontrib/platformtest.sh: make command name quoting consistent
Alexander Barton [Sun, 7 Nov 2010 14:26:26 +0000 (15:26 +0100)]
contrib/platformtest.sh: make command name quoting consistent

14 years agocontrib/ngircd-redhat.init: updated email address of Naoya Nakazawa
Alexander Barton [Sun, 7 Nov 2010 13:18:04 +0000 (14:18 +0100)]
contrib/ngircd-redhat.init: updated email address of Naoya Nakazawa

14 years agoFix up generation and distribution of sample-ngircd.conf
Alexander Barton [Wed, 3 Nov 2010 22:47:21 +0000 (23:47 +0100)]
Fix up generation and distribution of sample-ngircd.conf

- Add generated sample-ngircd.conf to new .gitignore file,
- refactor Makefile.am to generate sample-ngircd.conf on "make all",
  to clean it up on "make clean", and to install it to the correct place.
- Make sure path names in sample-ngircd.conf are separated by "/".

14 years agodoc: change path names in sample-ngircd.conf depending on sysconfdir
Florian Westphal [Mon, 1 Nov 2010 22:47:04 +0000 (23:47 +0100)]
doc: change path names in sample-ngircd.conf depending on sysconfdir

14 years agongIRCd Release 17~rc3 rel-17-rc3
Alexander Barton [Wed, 27 Oct 2010 20:31:05 +0000 (22:31 +0200)]
ngIRCd Release 17~rc3

14 years agoFix connect attempts to further IP addresses of outgoing server links
Alexander Barton [Wed, 27 Oct 2010 19:59:51 +0000 (21:59 +0200)]
Fix connect attempts to further IP addresses of outgoing server links

If a hostname resolves to more than one IP address (round-robin DNS,
IPv4 and IPv6) and an attempt to connect to the first address fails,
ngIRCd should try to connect to the 2nd address, 3rd address etc.

But because of a wrong variable used in the call to New_Server(),
the wrong server structure has been used in further connection attemps
which possibly lead to connection attempts to already connected servers.

14 years agoDebian: Install default /etc/pam.d/ngircd allowing all logins
Alexander Barton [Tue, 26 Oct 2010 22:43:02 +0000 (00:43 +0200)]
Debian: Install default /etc/pam.d/ngircd allowing all logins

This is required for backwards compatibility when installing the -full
or -full-dbg package variant: PAM is enabled now but no configuration
present, so all login attempts would be denied ...

Creating /etc/pam.d/ngircd including "auth required pam_permit.so"
restores the old behaviour of allowing all connections.

14 years agoDebian: update standards to 3.9.1; add libpam0g-dev dependency
Alexander Barton [Tue, 26 Oct 2010 20:56:01 +0000 (22:56 +0200)]
Debian: update standards to 3.9.1; add libpam0g-dev dependency

14 years agoMake contrib/platformtest.sh more portable
Alexander Barton [Tue, 26 Oct 2010 20:18:30 +0000 (22:18 +0200)]
Make contrib/platformtest.sh more portable

14 years agoMac OS X package ("make osxpkg"): generate PAM configuration
Alexander Barton [Tue, 26 Oct 2010 13:15:06 +0000 (15:15 +0200)]
Mac OS X package ("make osxpkg"): generate PAM configuration

14 years agoXcode builds ("make xcode"): disable pam_fail_delay()
Alexander Barton [Tue, 26 Oct 2010 13:13:24 +0000 (15:13 +0200)]
Xcode builds ("make xcode"): disable pam_fail_delay()

disable pam_fail_delay() only is available starting with Mac
OS X 10.6; but we use the 10.5 SDK for campatibility, so don't use
this function at all when building using Xcode.

14 years agoXcode: update project file, use 10.5.x SDK
Alexander Barton [Tue, 26 Oct 2010 13:10:14 +0000 (15:10 +0200)]
Xcode: update project file, use 10.5.x SDK

This is required for universal 32 bit and 64 bit builds: now code
for ppc, i386, and x86_64 is generated (which requires 10.5 or newer).

14 years agoXcode builds ("make xcode"): detect version number correctly
Alexander Barton [Tue, 26 Oct 2010 13:09:01 +0000 (15:09 +0200)]
Xcode builds ("make xcode"): detect version number correctly

14 years agongIRCd release 17~rc2 rel-17-rc2
Alexander Barton [Mon, 25 Oct 2010 16:51:32 +0000 (18:51 +0200)]
ngIRCd release 17~rc2

14 years agoUpdated contrib/platformtest.sh (new version scheme)
Alexander Barton [Mon, 25 Oct 2010 16:49:54 +0000 (18:49 +0200)]
Updated contrib/platformtest.sh (new version scheme)

 - handle version numbers generated by "git describe"
 - detect gcc compiler version correctly when "-std=xxx" is used

14 years agoNew doc/HowToRelease.txt file describing the release process
Alexander Barton [Mon, 25 Oct 2010 12:46:58 +0000 (14:46 +0200)]
New doc/HowToRelease.txt file describing the release process

14 years agoZeroConf: include header files missing since commit a988bbc86a
Alexander Barton [Sun, 24 Oct 2010 22:17:46 +0000 (00:17 +0200)]
ZeroConf: include header files missing since commit a988bbc86a

14 years agoGenerate ngIRCd version number from GIT tag
Alexander Barton [Wed, 20 Oct 2010 22:20:08 +0000 (00:20 +0200)]
Generate ngIRCd version number from GIT tag

Now the ngIRCd release/version number is deduced from the "current"
annotated GIT tag; see "git describe --help" for details. This is the
same scheme the Linux kernel uses and gives much more details version
numbers for interim releases and inofficial source archives generated
using "make dist".

Please note: the version number is only updated it the autogen.sh
script is run; so after pulling in and pushing out new commits, you
should run ./autogen.sh!

14 years agoMake sourcecode compatible with ansi2knr again
Alexander Barton [Sun, 24 Oct 2010 19:48:32 +0000 (21:48 +0200)]
Make sourcecode compatible with ansi2knr again

This allows to compile ngIRCd using a pre-ANSI K&R C compiler again:
all source files are automatically converted by the included ansi2knr
program (of GNU automake/autoconf) before compiling them with the
K&R C compiler, but a few coding standards must be met.

Tested on Apple A/UX 3.x.
Regression testing on Linux and Mac OS X.

14 years ago./configure: check if C compiler can compile ISO Standard C
Alexander Barton [Sun, 24 Oct 2010 12:14:30 +0000 (14:14 +0200)]
./configure: check if C compiler can compile ISO Standard C

This is required for enabling ansi2knr on systems that don't have an
ANSI C compiler installed (e.g. on A/UX with Apple standard C compiler).

14 years ago./configure: check support for C prototypes again
Alexander Barton [Sun, 24 Oct 2010 11:50:22 +0000 (13:50 +0200)]
./configure: check support for C prototypes again

14 years agoDon't use PARAMS() macro for function implementations
Alexander Barton [Sun, 24 Oct 2010 11:41:51 +0000 (13:41 +0200)]
Don't use PARAMS() macro for function implementations

The PARAMS() macro is only needed for function prototypes;
don't use it for the actual implementations.

14 years agoAdded m68k/apple/aux3.0.1 (gcc 2.7.2) to doc/Platforms.txt
Alexander Barton [Tue, 19 Oct 2010 20:19:18 +0000 (22:19 +0200)]
Added m68k/apple/aux3.0.1 (gcc 2.7.2) to doc/Platforms.txt

14 years agoOnly try to set FD_CLOEXEC if this flag is defined
Alexander Barton [Tue, 19 Oct 2010 20:17:12 +0000 (22:17 +0200)]
Only try to set FD_CLOEXEC if this flag is defined

A/UX 3.x doesn't implement this constant, for example.

14 years agoOnly use "__attribute__ ((unused))" if GCC >=2.8 is used
Alexander Barton [Tue, 19 Oct 2010 20:13:12 +0000 (22:13 +0200)]
Only use "__attribute__ ((unused))" if GCC >=2.8 is used

At least GCC 2.7.2 doesn't support this attribute.

14 years agodoc/Makefile.am: don¹t set docdir, automake handles it already
Alexander Barton [Wed, 13 Oct 2010 20:46:29 +0000 (22:46 +0200)]
doc/Makefile.am: don¹t set docdir, automake handles it already

And elder make(1) programs don¹t like "x ?= y" ...

14 years agongIRCd release 17~rc1 rel-17-rc1
Alexander Barton [Mon, 11 Oct 2010 21:25:48 +0000 (23:25 +0200)]
ngIRCd release 17~rc1

14 years agoNew configuration option "NoZeroConf" to disable ZeroConf registration
Alexander Barton [Mon, 11 Oct 2010 14:54:49 +0000 (16:54 +0200)]
New configuration option "NoZeroConf" to disable ZeroConf registration

If ngIRCd is compiled to register its services using ZeroConf (e.g. using
Howl, Avahi or on Mac OS X) this parameter can be used to disable service
registration at runtime.

14 years agoXcode: only build current architecture in "Debug" target
Alexander Barton [Sat, 9 Oct 2010 18:13:54 +0000 (20:13 +0200)]
Xcode: only build current architecture in "Debug" target

14 years agodoc/Platforms.txt: added NetBSD 5.0.2
Alexander Barton [Thu, 7 Oct 2010 11:20:30 +0000 (13:20 +0200)]
doc/Platforms.txt: added NetBSD 5.0.2

14 years agoUpdated doc/Platforms.txt
Alexander Barton [Tue, 5 Oct 2010 21:19:54 +0000 (23:19 +0200)]
Updated doc/Platforms.txt

14 years agoMake sure sighandlers.h is listed in noinst_HEADERS
Alexander Barton [Tue, 5 Oct 2010 19:57:01 +0000 (21:57 +0200)]
Make sure sighandlers.h is listed in noinst_HEADERS

... because it must be included in the distribution archive :-)

14 years agoconst'ify ngt_SyslogFacilityName() function
Alexander Barton [Tue, 5 Oct 2010 18:16:35 +0000 (20:16 +0200)]
const'ify ngt_SyslogFacilityName() function

This fixes the following gcc compiler warning:

tool.c: In function 'ngt_SyslogFacilityName':
tool.c:195: warning: return discards qualifiers from pointer target type

14 years agoDebian packages: build "-full" and "-full-dbg" with support for PAM
Alexander Barton [Sun, 3 Oct 2010 13:06:07 +0000 (15:06 +0200)]
Debian packages: build "-full" and "-full-dbg" with support for PAM

14 years agoNew configuration option "SyslogFacility"
Alexander Barton [Fri, 24 Sep 2010 15:39:11 +0000 (17:39 +0200)]
New configuration option "SyslogFacility"

The new option "SyslogFacility" deines the syslog "facility" to which
ngIRCd should send log messages.

Possible values are system dependant, but most probably "auth", "daemon",
"user" and "local1" through "local7" are possible values; see syslog(3).
Default is "local5" for historical reasons.

14 years agoNew functions ngt_SyslogFacilityName() and ngt_SyslogFacilityID()
Alexander Barton [Fri, 24 Sep 2010 14:29:55 +0000 (16:29 +0200)]
New functions ngt_SyslogFacilityName() and ngt_SyslogFacilityID()

These both functions translate syslog facility names to ID numbers
and vice versa. On systems that don't define the facilitynames[] array
in syslog.h, we try to build one ourself.

14 years agoExplicitly cast return value of read(2) to "int"
Alexander Barton [Wed, 22 Sep 2010 12:15:46 +0000 (14:15 +0200)]
Explicitly cast return value of read(2) to "int"

This fixes the following gcc warning, emitted by Xcode:

src/ngircd/sighandlers.c: In function 'Signal_Callback':
src/ngircd/sighandlers.c:239: warning: implicit conversion shortens 64-bit value into a 32-bit value

14 years agoAdd sighandlers.{c|h} to Xcode project
Alexander Barton [Wed, 22 Sep 2010 12:11:30 +0000 (14:11 +0200)]
Add sighandlers.{c|h} to Xcode project

And update static Mac OS X config.h used by the Xcode project.

14 years agoDon't call sigaction() if it is not available on the system
Alexander Barton [Wed, 22 Sep 2010 12:10:09 +0000 (14:10 +0200)]
Don't call sigaction() if it is not available on the system

14 years agoFix signalpipe file descriptor leak on RESTART
Florian Westphal [Tue, 14 Sep 2010 21:53:59 +0000 (23:53 +0200)]
Fix signalpipe file descriptor leak on RESTART

Signals_Init() must only be called once.
This does not affect any ngircd release version.

Earlier version of this patch moved the io and sighandler
initialization before the while() loop, but as Alexander
Barton noticed that broke all systems without builtin select
support in io.c...

14 years agosighandlers.{c|h}: Code cleanup
Alexander Barton [Mon, 13 Sep 2010 22:30:45 +0000 (00:30 +0200)]
sighandlers.{c|h}: Code cleanup

 - declare signals_catch[] array not between the function implementations.
 - rename now local function NGIRCd_Rehash() to Rehash().
 - remove empty and therefore not used "catch SIGHUP; break;".

14 years agoMake sighandlers.{c|h} compatible with ansi2knr
Alexander Barton [Mon, 13 Sep 2010 22:29:34 +0000 (00:29 +0200)]
Make sighandlers.{c|h} compatible with ansi2knr

14 years agoUpdated ChangeLog to include signal handler changes
Alexander Barton [Mon, 13 Sep 2010 22:18:20 +0000 (00:18 +0200)]
Updated ChangeLog to include signal handler changes

14 years agoBump version number to "17-dev"
Alexander Barton [Fri, 10 Sep 2010 22:02:37 +0000 (00:02 +0200)]
Bump version number to "17-dev"

14 years agoUpdate ChangeLog and NEWS: include SIGUSR1/SIGUSR2 changes
Alexander Barton [Fri, 10 Sep 2010 19:22:08 +0000 (21:22 +0200)]
Update ChangeLog and NEWS: include SIGUSR1/SIGUSR2 changes

14 years agoOutput connection status when dumping the internal server state
Alexander Barton [Fri, 10 Sep 2010 19:11:25 +0000 (21:11 +0200)]
Output connection status when dumping the internal server state

14 years agoReformat "server state" debug messages a little bit
Alexander Barton [Fri, 10 Sep 2010 19:10:17 +0000 (21:10 +0200)]
Reformat "server state" debug messages a little bit

14 years agoEnable the daemon to dump its internal state in debug-mode.
Alexander Barton [Wed, 9 Apr 2008 17:03:24 +0000 (19:03 +0200)]
Enable the daemon to dump its internal state in debug-mode.

This patch allows ngIRCd to dump its internal state (connected clients,
actual configuration) when compiled with --enable-debug. The daemon
catches two more signals:

 - SIGUSR1: toggle debug mode (on/off),
 - SIGUSR2: dump internal state to console/syslog.

14 years agosignalhandlers: add fallback to deprecated sysv API
Florian Westphal [Sat, 11 Sep 2010 09:33:27 +0000 (11:33 +0200)]
signalhandlers: add fallback to deprecated sysv API

14 years agoremove NGIRCd_SignalRehash
Florian Westphal [Fri, 10 Sep 2010 22:27:21 +0000 (00:27 +0200)]
remove NGIRCd_SignalRehash

now that the main signal handling is done from the dispatcher
loop we can call NGIRCD_Rehash() directly.

the /REHASH handler can queue the Rehash() function for
execution by sending a SIGHUP.  It will be run when we
return back to the dispatch loop.

14 years agoAdd new 'delayed' signal handlers.
Florian Westphal [Fri, 10 Sep 2010 22:19:01 +0000 (00:19 +0200)]
Add new 'delayed' signal handlers.

Allows to defer/queue signal processing for execution on the next
event dispatch call, i.e. we can perform any signal action in
normal, non-signal context.

Example uses:
- Reload everything on HUP without writing a global "SIGHUP_received"
  variable
- Dump status of internal Lists on SIGUSR1, etc.

14 years agoio: add io_cloexec to set close-on-exec flag.
Florian Westphal [Fri, 10 Sep 2010 21:41:29 +0000 (23:41 +0200)]
io: add io_cloexec to set close-on-exec flag.

14 years agong_ipaddr.h: include assert.h
Florian Westphal [Fri, 10 Sep 2010 22:25:23 +0000 (00:25 +0200)]
ng_ipaddr.h: include assert.h

We use assert() in this header, so we should include assert.h.

14 years agoConn_SyncServerStruct(): test all connections; and work case insensitive
Alexander Barton [Wed, 8 Sep 2010 00:02:01 +0000 (02:02 +0200)]
Conn_SyncServerStruct(): test all connections; and work case insensitive

Fix synchronization of established connections and configured server
structures after a configuration update:

 - Not only test servers that already have a connection, but also check
   and update configured servers to which a new connection is beeing
   established (SERVER_WAIT state).

 - And do the server name comparision case-insensitive.

14 years agoCheck_Servers(): skip servers already beeing connected
Alexander Barton [Tue, 7 Sep 2010 22:45:23 +0000 (00:45 +0200)]
Check_Servers(): skip servers already beeing connected

Let CheckServers() not only skip servers that already have a
connection, but also skip servers to which a new connection is
already beeing established (SERVER_WAIT state).

14 years agoCheck_Servers(): Code cleanup
Alexander Barton [Tue, 7 Sep 2010 22:42:57 +0000 (00:42 +0200)]
Check_Servers(): Code cleanup