Commit fad14f4c authored by luhan Wang's avatar luhan Wang

Merge branch 'master' of http://git.opensource5g.org/openxg/amf

parents acfbd900 ace3b58a
#!/bin/bash
#**************************************
License_name="/home/root1/desktop/license.txt"
paper=1
str='\n'
#**************************************
until [ -z "$1" ]
do
case "$1" in
-p | --file-path-name)
echo "waiting......."
filelist=`find $2 -iname "*.cpp" -o -iname "*.hpp" -o -iname "*.c" -o -iname "*.h"`
for filename in $filelist;do
if grep -q "OpenAirInterface" $filename
then
echo "There's already license in $filename"
else
paper=1
cat $License_name|while read LINE
do
if [ -z "$LINE" ]
then
sed -i "${paper}i\\$str" $filename
else
sed -i "${paper}i\\$LINE" $filename
fi
paper=`expr $paper + 1`
done
echo "add license successfully to $filename"
fi
clang-format -style=Google -i $filename
done
echo "clang-format and add license successfully"
break
;;
-f | --file-name)
echo "file name is $2"
if grep -q "OpenAirInterface" $2
then
echo "There's already license in $2"
else
cat $License_name|while read LINE
do
if [ -z "$LINE" ]
then
sed -i "${paper}i\\$str" $2
else
sed -i "${paper}i\\$LINE" $2
fi
paper=`expr $paper + 1`
done
echo "add license successfully to $2"
fi
clang-format -style=Google -i $2
echo "clang-format and add license successfully"
break
;;
*)
echo "unknown option $1"
break
;;
esac
done
......@@ -1183,9 +1183,7 @@ void amf_n1::curl_http_client(
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT_MS);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1);
curl_easy_setopt(curl, CURLOPT_INTERFACE, "ens33");
// Logger::amf_n1().info("[CURL] request sent by interface " +
// udm_cfg.nudr.if_name);
curl_easy_setopt(curl, CURLOPT_INTERFACE, amf_cfg.nausf.if_name.c_str());
// Response information.
long httpCode = {0};
......
......@@ -566,6 +566,7 @@ void amf_n11::curl_http_client(
// free curl before returning
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
psc.get()->smf_context_location = "/nsmf-pdusession/v2/sm-contexts/1";//try to fix bugs for no-response from SMF when requesting /nsmf-pdusession/v2/sm-contexts (first pdu session establishment request)
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment