]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
couple small usability issues
authorRaymond Chandler <intralanman@freeswitch.org>
Thu, 23 Dec 2010 23:01:21 +0000 (18:01 -0500)
committerRaymond Chandler <intralanman@freeswitch.org>
Thu, 23 Dec 2010 23:01:21 +0000 (18:01 -0500)
libs/esl/perl/ESL/Dispatch.pm

index 1d21934046a7b924c5200c11d191c19d30c8e59f..d1712d1cfc68369278e5d500589c43dfb0589411 100644 (file)
@@ -40,7 +40,8 @@ sub set_callback($;$$) {
   $self->{_callback}->{$event} = shift;
   my $subclass = shift;
   if($subclass) {
-    $self->{_custom_subclass} = split(/,/, $subclass);
+    my @subclasses = split(/,/, $subclass);
+    $self->{_custom_subclass} = \@subclasses;
   }
 }
 
@@ -79,7 +80,7 @@ sub run($;) {
   for(;;) {
     # Only register for events we have callbacks for.
     for my $key ( keys %{$self->{_callback}} ) {
-      if ($key eq "CUSTOM") {
+      if ($key =~ m/custom/i) {
        foreach $subclass (@{$self->{_custom_subclass}}) {
          $self->{_esl}->events("plain", "$key $subclass");
        }