Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mmsd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chris T
mmsd
Commits
251eff66
Commit
251eff66
authored
Jan 21, 2021
by
Chris T
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Code clean up, Make sure you can't activate the bearer if there's no modem.
parent
d0d5a215
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
plugins/modemmanager.c
plugins/modemmanager.c
+12
-3
No files found.
plugins/modemmanager.c
View file @
251eff66
...
...
@@ -168,7 +168,7 @@ handle_method_call (GDBusConnection *connection,
}
else
{
g_dbus_method_invocation_return_dbus_error
(
invocation
,
"org.ofono.mms.ModemManager"
,
"Modem
and/or Context
not active!"
);
"Modem
is
not active!"
);
}
}
...
...
@@ -211,8 +211,14 @@ handle_method_call (GDBusConnection *connection,
g_dbus_method_invocation_return_value
(
invocation
,
NULL
);
}
else
if
(
g_strcmp0
(
method_name
,
"ProcessMessageQueue"
)
==
0
)
{
activate_bearer
(
modem
->
service
);
g_dbus_method_invocation_return_value
(
invocation
,
NULL
);
if
(
modem
->
modem_available
==
TRUE
)
{
activate_bearer
(
modem
->
service
);
g_dbus_method_invocation_return_value
(
invocation
,
NULL
);
}
else
{
g_dbus_method_invocation_return_dbus_error
(
invocation
,
"org.ofono.mms.ModemManager"
,
"Modem is not active!"
);
}
}
}
...
...
@@ -613,6 +619,7 @@ pur_mm_state (int state)
modem
->
registration_id
);
g_bus_unown_name
(
modem
->
owner_id
);
mms_error
(
"ModemManagerPlugin(): ModemManager vanished"
);
modem
->
modem_available
=
FALSE
;
}
else
{
mms_error
(
"ModemManagerPlugin(): Could not connect to ModemManager"
);
}
...
...
@@ -887,6 +894,8 @@ static int modemmanager_init(void)
introspection_data
=
g_dbus_node_info_new_for_xml
(
introspection_xml
,
NULL
);
g_assert
(
introspection_data
!=
NULL
);
modem
->
modem_available
=
FALSE
;
modem
->
manager_available
=
FALSE
;
modem
->
context_active
=
FALSE
;
modem
->
plugin_registered
=
FALSE
;
mm_get_modem_manager
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment