Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:fix-proxy-path into ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:libmbim/xenial/1.14.0

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 4b0b294a885ffdfda4001afa7f19983078a1a562
Merged at revision: 3a02f7541da63b1fc0861590d10203dcccbd9b48
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:fix-proxy-path
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:libmbim/xenial/1.14.0
Diff against target: 32 lines (+12/-1)
1 file modified
src/libmbim-glib/mbim-device.c (+12/-1)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Needs Fixing
Simon Fels Approve
Matteo Croce (community) Approve
Konrad Zapałowicz (community) code Approve
Review via email: mp+313780@code.launchpad.net

Description of the change

Use snap path to start mbim-proxy

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) :
review: Needs Fixing
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) :
Revision history for this message
Simon Fels (morphis) :
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

lgtm

review: Approve (code)
Revision history for this message
Matteo Croce (teknoraver) :
review: Approve
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@morphis great that you agree in removing that var. Pushed.

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) :
review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c
2index a001940..97faa05 100644
3--- a/src/libmbim-glib/mbim-device.c
4+++ b/src/libmbim-glib/mbim-device.c
5@@ -1100,6 +1100,8 @@ create_iochannel_with_socket (CreateIoChannelContext *ctx)
6 if (!ctx->self->priv->socket_connection) {
7 gchar **argc;
8 GSource *source;
9+ const gchar *snap_path;
10+ gchar *mbim_proxy_path;
11
12 g_debug ("cannot connect to proxy: %s", error->message);
13 g_clear_error (&error);
14@@ -1118,8 +1120,17 @@ create_iochannel_with_socket (CreateIoChannelContext *ctx)
15
16 g_debug ("spawning new mbim-proxy (try %u)...", ctx->spawn_retries);
17
18+ mbim_proxy_path = g_malloc (PATH_MAX);
19+ snap_path = g_getenv ("SNAP");
20+ if (snap_path)
21+ g_snprintf(mbim_proxy_path, PATH_MAX, "%s%s/mbim-proxy",
22+ snap_path, LIBEXEC_PATH);
23+ else
24+ g_snprintf(mbim_proxy_path, PATH_MAX, "%s/mbim-proxy",
25+ LIBEXEC_PATH);
26+
27 argc = g_new0 (gchar *, 2);
28- argc[0] = g_strdup (LIBEXEC_PATH "/mbim-proxy");
29+ argc[0] = mbim_proxy_path; /* Freed by g_strfreev */
30 if (!g_spawn_async (NULL, /* working directory */
31 argc,
32 NULL, /* envp */

Subscribers

People subscribed via source and target branches