projects
/
working
/
SIPServer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfec97f
)
LP1579144: Give Sip/MsgType.pm a copy of to_bool() from ILS.pm
user/miker/lp1579144_login_location
author
Mike Rylander
<mrylander@gmail.com>
Wed, 14 Sep 2016 12:25:58 +0000
(08:25 -0400)
committer
Mike Rylander
<mrylander@gmail.com>
Wed, 14 Sep 2016 12:25:58 +0000
(08:25 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Sip/MsgType.pm
patch
|
blob
|
history
diff --git
a/Sip/MsgType.pm
b/Sip/MsgType.pm
index
aa894d2
..
6c9cda3
100644
(file)
--- a/
Sip/MsgType.pm
+++ b/
Sip/MsgType.pm
@@
-288,6
+288,15
@@
foreach my $i (keys(%handlers)) {
}
}
+# Stolen from ../ILS.pm, useful in here as well
+sub to_bool {
+ my $bool = shift;
+
+ # If it's defined, and matches a true sort of string, or is
+ # a non-zero number, then it's true.
+ return defined($bool) && (($bool =~ /true|y|yes/i) || $bool != 0);
+}
+
sub new {
my ($class, $msg, $seqno) = @_;
my $self = {};