modem-broadband: avoid a crash if we fail to guess an APN

Don't proceed if the context was torn down on an error in
try_create_connect_properties().

  <info>  [1574092292.0225] manager: NetworkManager state is now CONNECTING
  <warn>  [1574092292.0228] modem-broadband[ttyV0]: failed to connect 'ttyV0': unable to determine the network id
  <info>  [1574092292.0230] device (ttyV0): state change: prepare -> failed (reason 'modem-init-failed', sys-iface-state: 'managed')
  <info>  [1574092292.0236] manager: NetworkManager state is now DISCONNECTED
  <warn>  [1574092292.0250] device (ttyV0): Activation: failed for connection 'ttyV0'

  (NetworkManager:69212): libnm-CRITICAL **: 16:51:32.025: ((libnm-core/nm-connection.c:193)): assertion '<dropped>' failed

  Thread 1 "NetworkManager" received signal SIGTRAP, Trace/breakpoint trap.
  0x00007ffff78da6e5 in _g_log_abort () from /lib64/libglib-2.0.so.0
  Missing separate debuginfos, use: dnf debuginfo-install ModemManager-glib-1.10.6-2.fc31.x86_64 audit-libs-3.0-0.12.20190507gitf58ec40.fc31.x86_64 bluez-libs-5.51-1.fc31.x86_64 brotli-1.0.7-6.fc31.x86_64 cyrus-sasl-lib-2.1.27-2.fc31.x86_64 glib2-2.62.2-1.fc31.x86_64 glibc-2.30-5.fc31.x86_64 gmp-6.1.2-10.fc31.x86_64 gnutls-3.6.10-1.fc31.x86_64 gvfs-client-1.42.1-1.fc31.x86_64 jansson-2.12-4.fc31.x86_64 keyutils-libs-1.6-3.fc31.x86_64 krb5-libs-1.17-45.fc31.x86_64 libcap-ng-0.7.10-1.fc31.x86_64 libcom_err-1.45.3-1.fc31.x86_64 libcurl-7.66.0-1.fc31.x86_64 libffi-3.1-23.fc31.x86_64 libgcc-9.2.1-1.fc31.x86_64 libgcrypt-1.8.5-1.fc31.x86_64 libgpg-error-1.36-2.fc31.x86_64 libidn2-2.2.0-2.fc31.x86_64 libmount-2.34-3.fc31.x86_64 libndp-1.7-4.fc31.x86_64 libnghttp2-1.39.2-1.fc31.x86_64 libselinux-2.9-5.fc31.x86_64 libssh-0.9.0-6.fc31.x86_64 libtasn1-4.14-2.fc31.x86_64 libunistring-0.9.10-6.fc31.x86_64 libuuid-2.34-3.fc31.x86_64 libxcrypt-4.4.10-1.fc31.x86_64 lz4-libs-1.9.1-1.fc31.x86_64 nss-mdns-0.14.1-4.fc31.x86_64 openldap-2.4.47-3.fc31.x86_64 openssl-libs-1.1.1d-2.fc31.x86_64 p11-kit-0.23.16.1-2.fc31.x86_64 pcre-8.43-2.fc31.1.x86_64 pcre2-10.33-15.fc31.x86_64 systemd-libs-243-4.gitef67743.fc31.x86_64 xz-libs-5.2.4-6.fc31.x86_64 zlib-1.2.11-20.fc31.x86_64
  (gdb) bt
  #0  0x00007ffff78da6e5 in _g_log_abort () at /lib64/libglib-2.0.so.0
  #1  0x00007ffff78db9b6 in g_logv () at /lib64/libglib-2.0.so.0
  #2  0x00007ffff78dbb83 in g_log () at /lib64/libglib-2.0.so.0
  #3  0x000055555563fcd2 in _nm_g_return_if_fail_warning (line=line@entry=193, file=0x5555557ae221 "libnm-core/nm-connection.c", log_domain=0x5555557ae23c "libnm") at ./shared/nm-default.h:219
  #4  0x000055555563feba in _connection_get_setting_checkPython Exception <class 'gdb.error'> No type named TypeNode.:
   (connection=0x0, setting_type=) at libnm-core/nm-connection.c:193
  #5  _connection_get_setting_checkPython Exception <class 'gdb.error'> No type named TypeNode.:
   (connection=0x0, setting_type=) at libnm-core/nm-connection.c:191
  #6  0x00007fffe871f8b4 in nm_modem_get_connection_ip_type (self=self@entry=0x7fffd801c730, connection=0x0, error=error@entry=0x7fffffffc8e8) at src/devices/wwan/nm-modem.c:374
  #7  0x00007fffe871bfed in connect_context_step (self=0x7fffd801c730) at src/devices/wwan/nm-modem-broadband.c:591
  #8  0x00007fffe871c74b in modem_act_stage1_prepare (_self=0x7fffd801c730, connection=0x555555af5520, out_failure_reason=<optimized out>) at src/devices/wwan/nm-modem-broadband.c:687
  #9  0x00007fffe8720203 in nm_modem_act_stage1_prepare (self=0x7fffd801c730, req=0x555555b08a30, out_failure_reason=0x7fffffffcbe0) at src/devices/wwan/nm-modem.c:1045
  #10 0x0000555555705f1b in activate_stage1_device_prepare (self=0x555555a956a0) at src/devices/nm-device.c:6562
  #11 0x00005555556dcbca in activation_source_handle_cb (self=0x555555a956a0, addr_family=2) at src/devices/nm-device.c:6177
  #12 0x00007ffff78d0dcb in g_idle_dispatch () at /lib64/libglib-2.0.so.0
  #13 0x00007ffff78d44a0 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
  #14 0x00007ffff78d4830 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
  #15 0x00007ffff78d4b23 in g_main_loop_run () at /lib64/libglib-2.0.so.0
  #16 0x0000555555599ff4 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:451
18 jobs for lr/modem-crash in 88 minutes and 30 seconds (queued for 54 seconds)
latest
Status Job ID Name Coverage
  Test
passed #966686
allowed to fail
checkpatch

00:00:52

manual #966692
allowed to fail manual
t_centos:7.5.1804
passed #966693
t_centos:7.6.1810

00:22:50

passed #966699
t_debian:10

00:10:34

passed #966698
t_debian:9

00:10:36

passed #966701
t_debian:sid

00:15:53

manual #966700
allowed to fail manual
t_debian:testing
manual #966687
allowed to fail manual
t_fedora:28
passed #966688
t_fedora:29

00:23:24

passed #966689
t_fedora:30

00:23:09

passed #966690
t_fedora:31

00:18:24

manual #966691
allowed to fail manual
t_fedora:rawhide
passed #966694
t_ubuntu:16.04

00:12:31

passed #966695
t_ubuntu:18.04

00:19:29

manual #966697
allowed to fail manual
t_ubuntu:devel
manual #966696
allowed to fail manual
t_ubuntu:rolling
 
  External
failed https://desktopqe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/beaker-NetworkManager-gitlab-trigger-code-upstream/886/

failed https://desktopqe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/beaker-NetworkManager-gitlab-trigger-code-upstream/886/

05:08:49