~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to src/lib/event.c

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20091123035737-zsgtzhfych8hir68
Tags: 2.1.7+dfsg-1
* Adopting the package, closes: #536623.
* New upstream version, closes: #513484.
  + Fixes the blooper in unlang evaluation logic, closes: #526175.
* Used quilt (and added README.source), and moved upstream file patching
  into debian/patches/. The source is no longer in collab-maint git
  (to make it simpler for me to finally get this out the door), but
  kept the .gitignore should we need that again.
* Dropped the dialup_admin/bin/backup_radacct patch (integrated upstream).
* Dropped the raddb/Makefile patch (problem no longer exists upstream).
* Dropped the lib/packet.c lib/radius.c main/listen.c patches (was from
  upstream 2.0.5 anyway).
* Dropped references to otp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Dropped references to snmp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Ship /etc/freeradius/modules/* in the freeradius package.
* Stop shipping sites-enabled symlinks in the package and instead create
  them only on initial install, thanks to Matej Vela, closes: #533396.
* Add export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" to the init script
  at the request of John Morrissey, closes: #550143.
* Stop installing /var/run/freeradius in the package to silence Lintian.
  The init script already recreates it at will.
* Remove executable bit from example.pl to silence Lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * event.c      Non-thread-safe event handling, specific to a RADIUS
3
3
 *              server.
4
4
 *
5
 
 * Version:     $Id: event.c,v 1.20 2008/04/30 08:17:22 aland Exp $
 
5
 * Version:     $Id$
6
6
 *
7
7
 *   This library is free software; you can redistribute it and/or
8
8
 *   modify it under the terms of the GNU Lesser General Public
23
23
 */
24
24
 
25
25
#include <freeradius-devel/ident.h>
26
 
RCSID("$Id: event.c,v 1.20 2008/04/30 08:17:22 aland Exp $")
 
26
RCSID("$Id$")
27
27
 
28
28
#include <freeradius-devel/libradius.h>
29
29
#include <freeradius-devel/heap.h>
317
317
        struct timeval when, *wake;
318
318
        fd_set read_fds;
319
319
 
320
 
        /*
321
 
         *      Cache the list of FD's to watch.
322
 
         */
323
 
        if (el->changed) {
324
 
                FD_ZERO(&el->read_fds);
325
 
 
326
 
                for (i = 0; i < el->max_readers; i++) {
327
 
                        if (el->readers[i].fd < 0) continue;
328
 
                        FD_SET(el->readers[i].fd, &el->read_fds);
329
 
                }
330
 
 
331
 
                el->changed = 0;
332
 
        }
333
 
 
334
320
        el->exit = 0;
335
321
        el->dispatch = 1;
336
322
 
337
323
        while (!el->exit) {
 
324
                /*
 
325
                 *      Cache the list of FD's to watch.
 
326
                 */
 
327
                if (el->changed) {
 
328
                        FD_ZERO(&el->read_fds);
 
329
                        
 
330
                        for (i = 0; i < el->max_readers; i++) {
 
331
                                if (el->readers[i].fd < 0) continue;
 
332
                                
 
333
                                FD_SET(el->readers[i].fd, &el->read_fds);
 
334
                        }
 
335
                        
 
336
                        el->changed = 0;
 
337
                }
338
338
 
339
339
                /*
340
340
                 *      Find the first event.  If there's none, we wait
390
390
                
391
391
                if (rcode <= 0) continue;
392
392
 
393
 
                el->changed = 0;
394
 
 
395
393
                for (i = 0; i < el->max_readers; i++) {
396
394
                        fr_event_fd_t *ef = &el->readers[i];
397
395