osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/37343?usp=email )
Change subject: gen_makefile: write content into a buffer first
......................................................................
gen_makefile: write content into a buffer first
Instead of directly writing the new Makefile, write the new content into
a buffer variable first. This ensures that we don't abort half-way while
writing the Makefile, and it allows replacing spaces -> tabs in the
next patch.
Change-Id: I9a0ee9aa5047b7d9af9673465441039cd55c221b
---
M gen_makefile.py
1 file changed, 44 insertions(+), 27 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/43/37343/1
diff --git a/gen_makefile.py b/gen_makefile.py
index ca9003a..76c81f8 100755
--- a/gen_makefile.py
+++ b/gen_makefile.py
@@ -465,19 +465,15 @@
if not build_dir:
build_dir = make_dir
-output = os.path.join(make_dir, args.output)
-print('Writing to %r' % output)
+content = '# This Makefile was generated by %s\n' % os.path.basename(sys.argv[0])
-with open(output, 'w') as out:
- out.write('# This Makefile was generated by %s\n' % os.path.basename(sys.argv[0]))
+configure_opts_args = ""
+for f in configure_opts_files:
+ if not f.endswith(".deps"):
+ configure_opts_args += f' \\\n\t\t{os.path.relpath(f, make_dir)}'
- configure_opts_args = ""
- for f in configure_opts_files:
- if not f.endswith(".deps"):
- configure_opts_args += f' \\\n\t\t{os.path.relpath(f, make_dir)}'
-
- # convenience: add a regen target that updates the generated makefile itself
- out.write(r'''
+# convenience: add a regen target that updates the generated makefile itself
+content += r'''
default: usrp
#
@@ -567,26 +563,33 @@
docker_cmd=f' \\\n\t\t--docker-cmd "{args.docker_cmd}"' if args.docker_cmd else '',
build_debug=f' \\\n\t\t--build-debug' if args.build_debug else '',
auto_distclean=' \\\n\t\t--auto-distclean' if args.auto_distclean else '',
- ))
+)
- # convenience target: clone all repositories first
- out.write('clone: \\\n\t' + ' \\\n\t'.join([ '.make.%s.clone' % p for p, d in projects_deps ]) + '\n\n')
+# convenience target: clone all repositories first
+content += 'clone: \\\n\t' + ' \\\n\t'.join([ '.make.%s.clone' % p for p, d in projects_deps ]) + '\n\n'
- # convenience target: clean all
- out.write('clean: \\\n\t' + ' \\\n\t'.join([ '%s-clean' % p for p, d in projects_deps ]) + '\n\n')
+# convenience target: clean all
+content += 'clean: \\\n\t' + ' \\\n\t'.join([ '%s-clean' % p for p, d in projects_deps ]) + '\n\n'
- # now the actual useful build rules
- out.write('all: clone all-install\n\n')
+# now the actual useful build rules
+content += 'all: clone all-install\n\n'
- out.write('all-install: \\\n\t' + ' \\\n\t'.join([ '.make.%s.install' % p for p, d in projects_deps ]) + '\n\n')
+content += 'all-install: \\\n\t' + ' \\\n\t'.join([ '.make.%s.install' % p for p, d in projects_deps ]) + '\n\n'
- for proj, deps in projects_deps:
- all_config_opts = []
- all_config_opts.extend(configure_opts.get('ALL') or [])
- all_config_opts.extend(configure_opts.get(proj) or [])
- out.write(gen_make(proj, deps, all_config_opts, args.jobs,
- make_dir, args.src_dir, build_dir, args.url, args.push_url,
- args.sudo_make_install, args.no_ldconfig,
- args.ldconfig_without_sudo, args.make_check))
+for proj, deps in projects_deps:
+ all_config_opts = []
+ all_config_opts.extend(configure_opts.get('ALL') or [])
+ all_config_opts.extend(configure_opts.get(proj) or [])
+ content += gen_make(proj, deps, all_config_opts, args.jobs,
+ make_dir, args.src_dir, build_dir, args.url, args.push_url,
+ args.sudo_make_install, args.no_ldconfig,
+ args.ldconfig_without_sudo, args.make_check)
+
+
+output = os.path.join(make_dir, args.output)
+print('Writing to %r' % output)
+
+with open(output, 'w') as out:
+ out.write(content)
# vim: expandtab tabstop=2 shiftwidth=2
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/37343?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I9a0ee9aa5047b7d9af9673465441039cd55c221b
Gerrit-Change-Number: 37343
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37332?usp=email )
Change subject: asterisk: Avoid waiting for 183 to signal DedicatedBearerStatus Up
......................................................................
asterisk: Avoid waiting for 183 to signal DedicatedBearerStatus Up
Change-Id: Icca6268f484d2a723d4d70de8755b7ec605b9194
---
M asterisk/IMS_ConnectionHandler.ttcn
1 file changed, 14 insertions(+), 5 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn
index 51f96ea..1609304 100644
--- a/asterisk/IMS_ConnectionHandler.ttcn
+++ b/asterisk/IMS_ConnectionHandler.ttcn
@@ -1190,6 +1190,11 @@
g_pars.subscr.cp.sip_seq_nr, "INVITE");
d_trying := activate(as_SIP_ignore_resp(exp));
+ if (g_pars.subscr.cp.mt.tx_coord_cmd_session_progress) {
+ /* Signal used to inform that Dedicated bearer can be established: */
+ COORD.send(IMS_COORD_CMD_CALL_SESSION_PROGRESS);
+ }
+
if (g_pars.subscr.cp.require_precondition_ext) {
var template (present) SDP_attribute_list preconds;
/* Rx 183 Session Progress */
@@ -1246,11 +1251,6 @@
body := omit);
SIP.send(req);
- if (g_pars.subscr.cp.mt.tx_coord_cmd_session_progress) {
- /* Signal used to inform that Dedicated bearer can be established: */
- COORD.send(IMS_COORD_CMD_CALL_SESSION_PROGRESS);
- }
-
/* Rx 200 OK (PRACK) */
exp := tr_SIP_Response(g_pars.subscr.cp.sip_call_id,
from_addr_exp,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37332?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Icca6268f484d2a723d4d70de8755b7ec605b9194
Gerrit-Change-Number: 37332
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37333?usp=email )
Change subject: asterisk: IMS: Fix To tag not updated when sending PRACK in MT call
......................................................................
asterisk: IMS: Fix To tag not updated when sending PRACK in MT call
Change-Id: I55716b7a48b63bc97ea936904a712e53899f03f6
---
M asterisk/IMS_ConnectionHandler.ttcn
1 file changed, 12 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn
index 1609304..ec163f5 100644
--- a/asterisk/IMS_ConnectionHandler.ttcn
+++ b/asterisk/IMS_ConnectionHandler.ttcn
@@ -1238,6 +1238,9 @@
g_pars.subscr.cp.peer_sdp.media_list[0].attributes));
}
+ /* Update To with the tags received from peer: */
+ g_pars.subscr.cp.to_addr := g_rx_sip_resp.msgHeader.toField;
+
/* Tx PRACK */
req := ts_SIP_PRACK(g_pars.subscr.cp.to_addr.addressField.nameAddr.addrSpec,
g_pars.subscr.cp.sip_call_id,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37333?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I55716b7a48b63bc97ea936904a712e53899f03f6
Gerrit-Change-Number: 37333
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged