Fixed handling network masks in the svdrphosts.conf file

This commit is contained in:
Klaus Schmidinger 2006-07-22 11:59:28 +02:00
parent 5f0b2fbf2e
commit bd6046c37d
3 changed files with 10 additions and 3 deletions

View File

@ -1937,3 +1937,6 @@ Anssi Hannula <anssi.hannula@gmail.com>
Antti Hartikainen <ami+vdr@ah.fi>
for updating 'S13E' in 'sources.conf'
Patrick Maier <maierp@informatik.tu-muenchen.de>
for fixing handling network masks in the svdrphosts.conf file

View File

@ -4818,3 +4818,5 @@ Video Disk Recorder Revision History
true.
- Newlines in title and short text of an EPG event are now changed into blanks only
after all other fixes, because a short text might become a description.
- Fixed handling network masks in the svdrphosts.conf file (thanks to Patrick
Maier).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.c 1.145 2006/04/17 11:00:00 kls Exp $
* $Id: config.c 1.146 2006/07/22 11:57:51 kls Exp $
*/
#include "config.h"
@ -106,8 +106,10 @@ bool cSVDRPhost::Parse(const char *s)
*(char *)p = 0; // yes, we know it's 'const' - will be restored!
if (m == 0)
mask = 0;
else
mask >>= (32 - m);
else {
mask <<= (32 - m);
mask = htonl(mask);
}
}
int result = inet_aton(s, &addr);
if (p)