From 3cd93a7d35085be5835686f638f9ea12c06c9a11 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Tue, 24 Apr 2018 08:10:38 +0200 Subject: [PATCH] TT#35507 fix send_sms() smsc checks * remove $config->{sms}{smsc} selection as there is no such thing as smsc in ngcp_panel.conf * remove charset from the send_sms query form as charset is now set in the smsc peer group and taken from the template Change-Id: I12ac8b74d2923a54194685c3f5e28a37f8df1902 --- lib/NGCP/Panel/Utils/SMS.pm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/NGCP/Panel/Utils/SMS.pm b/lib/NGCP/Panel/Utils/SMS.pm index 636136aed8..a4c45180fa 100644 --- a/lib/NGCP/Panel/Utils/SMS.pm +++ b/lib/NGCP/Panel/Utils/SMS.pm @@ -53,15 +53,6 @@ sub send_sms { my $user = $c->config->{sms}{user}; my $pass = $c->config->{sms}{pass}; - my @smsc = grep { $_->{id} and $_->{id} eq $id } @{$config->{sms}{smsc}}; - - if ($#smsc == -1) { - &{$err_code}("Error sending sms: invalid smsc peer id"); - return; - } - - my $charset = $smsc[0]->{charset} // 'utf-8'; - my $fullpath = "$schema://$host:$port$path"; my $ua = LWP::UserAgent->new( #ssl_opts => { verify_hostname => 0, SSL_verify_mode => 0 }, @@ -70,7 +61,6 @@ sub send_sms { my $uri = URI->new($fullpath); $uri->query_form( smsc => $smsc_peer, - charset => $charset, coding => $coding, user => "$user", pass => "$pass", @@ -364,7 +354,7 @@ sub add_journal_record { $cli = defined $pref_rs_cli->first ? $pref_rs_cli->first->value : ''; } - return $c->model('DB')->resultset('sms_journal')->create(\%args)); + return $c->model('DB')->resultset('sms_journal')->create(\%args); } 1;