/[cwmp]/google/trunk/bin/acs.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /google/trunk/bin/acs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 227 - (hide annotations)
Sun Nov 25 18:51:26 2007 UTC (16 years, 5 months ago) by dpavlin
File MIME type: text/plain
File size: 1077 byte(s)
 r266@brr:  dpavlin | 2007-11-25 19:50:35 +0100
 - first pass with Devel::LeakTrace::Fast
 - remove DBM::Deep store
 - CWMP::Queue now supports dir and clean args
 - create new parser for each request

1 dpavlin 28 #!/usr/bin/perl -w
2    
3     # acs.pl
4     #
5     # 06/18/07 09:19:54 CEST Dobrica Pavlinusic <dpavlin@rot13.org>
6    
7     use strict;
8    
9 dpavlin 30 use lib './lib';
10     use CWMP::Server;
11 dpavlin 203 use CWMP::Session;
12     use CWMP::Vendor;
13 dpavlin 57 use Getopt::Long;
14 dpavlin 203 use Data::Dump qw/dump/;
15 dpavlin 218 use File::Find;
16 dpavlin 28
17 dpavlin 227 #use Devel::LeakTrace::Fast;
18 dpavlin 224
19 dpavlin 28 my $port = 3333;
20 dpavlin 57 my $debug = 0;
21 dpavlin 164 my $store_path = './';
22     my $store_plugin = 'YAML';
23 dpavlin 205 my $create_dump = 1;
24 dpavlin 28
25 dpavlin 57 GetOptions(
26     'debug+' => \$debug,
27     'port=i' => \$port,
28 dpavlin 164 'store-path=s' => \$store_path,
29     'store-plugin=s' => \$store_plugin,
30 dpavlin 205 'create_dump!' => \$create_dump,
31 dpavlin 57 );
32    
33 dpavlin 218 if ( $create_dump ) {
34     warn "## cleaning dump directory\n" if $debug;
35     find({
36     wanted => sub {
37     my $path = $File::Find::name;
38     return if -d $path;
39     unlink($path) || die "can't remove $path: $!";
40     warn "## removed $path\n" if $debug;
41     },
42     no_chdir => 1,
43     }, 'dump/' );
44     }
45    
46 dpavlin 50 my $server = CWMP::Server->new({
47     port => $port,
48 dpavlin 205 session => {
49     store => {
50     module => $store_plugin,
51     path => $store_path,
52     debug => $debug,
53     },
54     create_dump => $create_dump,
55 dpavlin 150 },
56 dpavlin 53 debug => $debug,
57 dpavlin 50 });
58 dpavlin 203
59     CWMP::Vendor->add_triggers;
60    
61 dpavlin 28 $server->run();
62    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26