From: Brian West Date: Sat, 6 Mar 2010 00:32:04 +0000 (+0000) Subject: add the event as an arg to the callback. X-Git-Tag: v1.0.6~222 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=545b561379eaf58a0e7d8d51cfb1fad08e3e5674;p=thirdparty%2Ffreeswitch.git add the event as an arg to the callback. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16926 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/libs/esl/perl/ESL/Dispatch.pm b/libs/esl/perl/ESL/Dispatch.pm index 54ea1e0cb7..2523d794e5 100644 --- a/libs/esl/perl/ESL/Dispatch.pm +++ b/libs/esl/perl/ESL/Dispatch.pm @@ -63,7 +63,7 @@ sub render_event($;$$) { $callback = lc($self->{event_hash}->{'event-name'}); print "DEBUG: executing $callback callback\n"; } - &{$self->{_callback}->{lc($self->{event_hash}->{'event-name'})}}($self); + &{$self->{_callback}->{lc($self->{event_hash}->{'event-name'})}}($self, $self->{event_hash}); }; } diff --git a/libs/esl/perl/dispatch.pl b/libs/esl/perl/dispatch.pl index 477596c977..fd61913d83 100644 --- a/libs/esl/perl/dispatch.pl +++ b/libs/esl/perl/dispatch.pl @@ -13,13 +13,14 @@ sub worker { sub heartbeat { my $self = shift; - my $event = $self->{event_hash}; + my $event = shift; print Dumper $event; } sub channel_hangup { my $self = shift; - my $event = $self->{event_hash}; + my $event = shift; + print Dumper $event; print "DO SQL GOODIES HERE!\n"; }