Skip to content

Commit

Permalink
Update me_connect.php to correct code error
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonnier authored Oct 7, 2024
1 parent c479687 commit cb84f8c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions adapters/cisco_nx_rest/me_connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ public function send($origin, $rest_cmd) {
$payload_file=tempnam("/opt/sms/spool/tmp/","payload_".$this->sdid."_");
file_put_contents($payload_file, $rest_payload);
$curl_cmd .= ' @'.$payload_file;


$curl_cmd .= "'{$rest_payload}'";

}
$curl_cmd .= " && echo";

Expand All @@ -138,12 +136,15 @@ public function send($origin, $rest_cmd) {

protected function execute_curl_command($origin, $rest_cmd, $curl_cmd, $payload_file="" ) {

if ( $payload_file !== '')
{
unlink($payload_file);
}


$ret = exec_local ( $origin, $curl_cmd, $output_array );

if ( $payload_file !== '' && file_exists($payload_file) )
{
unlink($payload_file);
}

if ($ret !== SMS_OK) {
throw new SmsException ( "Call to API Failed", $ret );
}
Expand Down

0 comments on commit cb84f8c

Please sign in to comment.