~ubuntu-branches/debian/sid/rlinetd/sid

« back to all changes in this revision

Viewing changes to cleanups.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2010-03-20 18:03:45 UTC
  • mfrom: (2.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320180345-x1srfbe2tg00ezsf
Tags: 0.7-1
* New upstream version.
* Recommend rsyslog instead of sysklogd (closes: #526922).
* update-inetd:
  + add support for enabling, disabling and removing entries;
  + use ucf for managing generated files;
  + ignore ucf files in rlinetd.conf;
  + make appropriate changes in  postinst and postrm scripts.
* Set debhelper compat level to 7
* Standards-Version: 3.8.4 (no changes). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <rpc/rpc.h>
2
 
#include <rpc/pmap_clnt.h>
3
 
 
4
 
#include "data.h"
5
 
#include "error.h"
6
 
#include "parse.h"
7
 
#include "rlinetd.h"
8
 
 
9
 
void rlp_cleanup(struct rl_cleanup *rlc) {
10
 
        struct numlist *nl;
11
 
        struct rlc_unrpc *rlcu;
12
 
        struct rl_cleanup *next;
13
 
        
14
 
        do {
15
 
                switch(rlc->type) {
16
 
                        case RLC_UNRPC:
17
 
                                rlcu = (struct rlc_unrpc *)rlc->data;
18
 
                                if((nl = rlcu->vers)) {
19
 
                                        do {
20
 
                                                pmap_unset(rlcu->prog, nl->num);
21
 
                                        } while((nl = nl->next));
22
 
                                }
23
 
                                numlist_free(rlcu->vers);
24
 
                                break;
25
 
                        default:
26
 
                                rl_warn("unknown cleanup type %d", rlc->type);
27
 
                }
28
 
                if(rlc->data)
29
 
                        free(rlc->data);
30
 
                next = rlc->next;
31
 
                free(rlc);
32
 
        } while((rlc = next));
33
 
}
34
 
 
35
 
/* vim: set ts=2: */