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
changes/05/20705/2
Kirill Solomko 8 years ago
parent 091dee6d0b
commit 3cd93a7d35

@ -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;

Loading…
Cancel
Save