File 0780-megaco-examples-Bring-meas-up-to-date.patch of Package erlang

From 70f228300061610b5c95cb3f8fe9cd595fc37605 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Tue, 10 Sep 2019 11:51:42 +0200
Subject: [PATCH 2/3] [megaco|examples] Bring meas up to date

The meas examples has not been updated with the rest of
the app or otp. So, a number of stuff did not work:
no_smp (-smp disable) do not work anymore.
per_bin and ber_bin no longer exist (its just per and ber).

OTP-16061
---
 lib/megaco/examples/meas/megaco_codec_mstone2.erl  | 10 ++++-----
 .../examples/meas/megaco_codec_mstone_lib.erl      |  2 +-
 .../examples/meas/megaco_codec_transform.erl       |  8 ++++----
 lib/megaco/examples/meas/mstone1.sh.skel.src       | 24 +++++++---------------
 4 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/lib/megaco/examples/meas/megaco_codec_mstone2.erl b/lib/megaco/examples/meas/megaco_codec_mstone2.erl
index eb7c2cef71..07ed82a9f0 100644
--- a/lib/megaco/examples/meas/megaco_codec_mstone2.erl
+++ b/lib/megaco/examples/meas/megaco_codec_mstone2.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %% 
-%% Copyright Ericsson AB 2006-2016. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2019. All Rights Reserved.
 %% 
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -201,10 +201,10 @@ display_worker_result([{Mod, Conf, Cnt}|Res]) ->
     io:format("~s: ~w~n", [image_of(Mod, Conf), Cnt]),
     display_worker_result(Res).
 
-image_of(megaco_per_bin_encoder, Conf) ->
-    bin_image("per_bin", Conf);
-image_of(megaco_ber_bin_encoder, Conf) ->
-    bin_image("ber_bin", Conf);
+image_of(megaco_per_encoder, Conf) ->
+    bin_image("per", Conf);
+image_of(megaco_ber_encoder, Conf) ->
+    bin_image("ber", Conf);
 image_of(megaco_pretty_text_encoder, Conf) ->
     text_image("pretty", Conf);
 image_of(megaco_compact_text_encoder, Conf) ->
diff --git a/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl b/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl
index 93515d0f16..87e015eaab 100644
--- a/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl
+++ b/lib/megaco/examples/meas/megaco_codec_mstone_lib.erl
@@ -269,7 +269,7 @@ display_megaco_info() ->
     io:format("Megaco version:      ~s~n", [Ver]).
 
 display_asn1_info() ->
-    AI = megaco_ber__media_gateway_control_v1:info(),
+    AI = megaco_ber_media_gateway_control_v1:info(),
     Vsn = 
 	case lists:keysearch(vsn, 1, AI) of
 	    {value, {vsn, V}} when is_atom(V) ->
diff --git a/lib/megaco/examples/meas/megaco_codec_transform.erl b/lib/megaco/examples/meas/megaco_codec_transform.erl
index cfd8568fcf..7960e08dc2 100644
--- a/lib/megaco/examples/meas/megaco_codec_transform.erl
+++ b/lib/megaco/examples/meas/megaco_codec_transform.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %% 
-%% Copyright Ericsson AB 2002-2016. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2019. All Rights Reserved.
 %% 
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
 %% 
 %%          {Codec, Messages}.
 %% 
-%%          Codec = pretty | compact | ber | per | erlang
+%%          Codec    = pretty | compact | ber | per | erlang
 %%          Messages = [{Name, binary()}]
 %%          Name     = atom
 %%          
@@ -255,11 +255,11 @@ encode_message(compact, Msg) ->
     Conf = [{version3,?V3}],
     do_encode(Mod, Conf, Msg);
 encode_message(ber, Msg) ->
-    Mod  = megaco_ber_bin_encoder,
+    Mod  = megaco_ber_encoder,
     Conf = [{version3,?V3}],
     do_encode(Mod, Conf, Msg);
 encode_message(per, Msg) ->
-    Mod  = megaco_per_bin_encoder,
+    Mod  = megaco_per_encoder,
     Conf = [{version3,?V3}],
     do_encode(Mod, Conf, Msg);
 encode_message(erlang, Msg) ->
diff --git a/lib/megaco/examples/meas/mstone1.sh.skel.src b/lib/megaco/examples/meas/mstone1.sh.skel.src
index fc4b4a28ae..24df0101e9 100644
--- a/lib/megaco/examples/meas/mstone1.sh.skel.src
+++ b/lib/megaco/examples/meas/mstone1.sh.skel.src
@@ -3,7 +3,7 @@
 #
 # %CopyrightBegin%
 # 
-# Copyright Ericsson AB 2007-2016. All Rights Reserved.
+# Copyright Ericsson AB 2007-2019. All Rights Reserved.
 # 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -164,21 +164,15 @@ if [ $TYPE = factor ]; then
 
     MSTONE="-s $MODULE $STARTF $MSG_PACK $FACTOR"
 
-    # SCHEDS="no_smp 01 02 04"
-    # SCHEDS="no_smp 01 02 04 08"
-    # SCHEDS="no_smp 01 02 04 08 16"
-    # SCHEDS="no_smp 01 02 04 08 16 32"
-    # SCHEDS="no_smp 01 02 04 08 16 32 64"
-    SCHEDS="no_smp 01 02 03 04 05 06 07 08"
+    # SCHEDS="01 02 04"
+    # SCHEDS="01 02 04 08"
+    # SCHEDS="01 02 04 08 16"
+    # SCHEDS="01 02 04 08 16 32"
+    # SCHEDS="01 02 04 08 16 32 64"
+    SCHEDS="01 02 03 04 05 06 07 08"
 
     for i in `echo $SCHEDS`; do
         case $i in
-            no_smp)
-                SMP_INFO="No SMP"
-                SMP_OPTS="-smp disable" # THIS IS THE R12B WAY TO DISABLE SMP
-                LOG="mstone1-f$FACTOR-s00.log"
-                ;;
-
             01)
                 SMP_INFO="SMP: 1 scheduler"
                 SMP_OPTS="-smp +S $i"
@@ -222,10 +216,6 @@ elif [ $TYPE = sched ]; then
     # FACTORS="001 010 100"
 
     case $SCHED in
-        no_smp)
-            SMP_OPTS="-smp disable" # THIS IS THE R12B WAY TO DISABLE SMP
-            ;;
-
         *)
             SMP_OPTS="-smp +S $SCHED"
             ;;
-- 
2.16.4

openSUSE Build Service is sponsored by