Skip to content
Snippets Groups Projects

application: Fix handling commandline arguments

Open Mohammed Sadiq requested to merge mohammed.sadiq/calls:wip/sadiq/commandline into master
2 unresolved threads

handle_local_options are supposed to be handled only in local instance, and not in remote instance, fix that.

Also, the application isn’t required to handle files to open ‘tel:’ URIs. Handle it better.

Merge request reports

Members who can merge are allowed to add commits.

Pipeline #64801 failed

Pipeline failed for 7f9d9933 on mohammed.sadiq:wip/sadiq/commandline

Approval is optional
Merge unavailable: merge requests are read-only on archived projects.

Merge details

  • The source branch is 270 commits behind the target branch.
  • 1 commit will be added to master.
  • Source branch will be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 5 commits

    Compare with previous version

  • 437 g_application_activate (application);
    477 438
    478 open_tel_uri (self, uri);
    479 }
    480 else
    481 {
    482 uri = g_file_get_parse_name (files[i]);
    483 g_warning ("Don't know how to"
    484 " open file `%s', ignoring",
    485 uri);
    486 }
    439 arguments = g_application_command_line_get_arguments (command_line, &argc);
    487 440
    488 g_free (uri);
    489 }
    441 /* XXX: Should we handle only the first/last ‘tel:’ item? */
  • Mh, after rebasing the CI failed with

    Run-time dependency libcallaudio-0 found: NO (tried pkgconfig)
    src/meson.build:31:0: ERROR: Dependency "libcallaudio-0" not found, tried pkgconfig

    I wonder if the CI in !230 (merged) succeeds.

    Edit: Looks good

    Edited by Evangelos Ribeiro Tzaras
  • Julian Sparber added 12 commits

    added 12 commits

    Compare with previous version

  • mentioned in merge request !262 (merged)

  • Mohammed Sadiq added 44 commits

    added 44 commits

    Compare with previous version

  • Mohammed Sadiq added 1 commit

    added 1 commit

    • 0e127d49 - application: Fix handling commandline arguments

    Compare with previous version

  • Mohammed Sadiq added 1 commit

    added 1 commit

    • 7f9d9933 - application: Fix handling commandline arguments

    Compare with previous version

  • resolved all threads

  • will merge after a quick test on device

    • I did some testing and there are some issues:

      • invoking gnome-calls tel:+49XXXX does not start a call (it only starts a call if calls is not yet running - this breaks starting a call from contacts)
      • invoking gnome-calls tel:+49XXXX tel:+49YYYY (when calls is not already running) calls the last number (all other numbers are still shown in the call history)
      • invoking gnome-calls tel:+49XXXX tel:+49YYYY (when calls is already running) caused a segfault:
                      Stack trace of thread 1919:
                      #0  0x0000007fb96ba458 g_path_is_absolute (libglib-2.0.so.0 + 0x3d458)
                      #1  0x0000007fb8b8a208 new_for_cmdline_arg (libgio-2.0.so.0 + 0x6d208)
                      #2  0x00000055801558bc n/a (gnome-calls + 0x158bc)
                      #3  0x0000007fb8ba7d30 _g_cclosure_marshal_INT__OBJECTv (libgio-2.0.so.0 + 0x8ad30)
                      #4  0x0000007fb97d3444 g_type_class_meta_marshalv (libgobject-2.0.so.0 + 0x13444)
                      #5  0x0000007fb97d5274 _g_closure_invoke_va (libgobject-2.0.so.0 + 0x15274)
                      #6  0x0000007fb97ee10c g_signal_emit_valist (libgobject-2.0.so.0 + 0x2e10c)
                      #7  0x0000007fb97ef098 g_signal_emit_by_name (libgobject-2.0.so.0 + 0x2f098)
                      #8  0x0000007fb8c10dd4 g_application_impl_method_call (libgio-2.0.so.0 + 0xf3dd4)
                      #9  0x0000007fb8c3e724 call_in_idle_cb (libgio-2.0.so.0 + 0x121724)
                      #10 0x0000007fb96d0ab4 g_main_dispatch (libglib-2.0.so.0 + 0x53ab4)
                      #11 0x0000007fb96d0e5c g_main_context_iterate (libglib-2.0.so.0 + 0x53e5c)
                      #12 0x0000007fb96d0f24 g_main_context_iteration (libglib-2.0.so.0 + 0x53f24)
                      #13 0x0000007fb8c0eac8 g_application_run (libgio-2.0.so.0 + 0xf1ac8)
                      #14 0x000000558014d530 main (gnome-calls + 0xd530)
                      #15 0x0000007fb86c6218 __libc_start_main (libc.so.6 + 0x24218)
                      #16 0x000000558014d584 _start (gnome-calls + 0xd584)
                      #17 0x000000558014d584 _start (gnome-calls + 0xd584)
      
      ....
      
      Core was generated by `gnome-calls tel:+491602997901 tel:+4975424074379 tel:+497548979874844578'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  g_path_is_absolute (file_name=file_name@entry=0x5500000003 <error: Cannot access memory at address 0x5500000003>)
          at ../../../glib/gfileutils.c:2391

      I suspect !97 (diffs) is the culprit. Setting url_list = NULL might help here (haven't dug too deeply).

    • Probably some (most?) of the things I pointed out are fixed by !262 (merged) ?

      @mohammed.sadiq I'd appreciate a comment as I'm a bit confused as !262 (merged) also touches similar areas of the code

    • Please register or sign in to reply
  • Please register or sign in to reply
    Loading