summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-06-08 13:24:40 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-06-10 13:20:33 -0700
commitd6bc4028401e2f2c3e4a558f4f389e9a7eb5d0e6 (patch)
treee84f9d7bc8efc3784f36b4d4f16d5712bb95676b /src/main.c
parent79bd5951a8a2f2690e632d894a51d6c528fc31e9 (diff)
downloadbluez-d6bc4028401e2f2c3e4a558f4f389e9a7eb5d0e6.tar.gz
a2dp: Use streaming mode when MPS is enabled
If MPS is enabled use L2CAP streaming mode for AVDTP channels.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/main.c b/src/main.c
index 50e37e57a..e51f614b3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -74,12 +74,6 @@ struct main_opts main_opts;
static GKeyFile *main_conf;
static char *main_conf_file_path;
-static enum {
- MPS_OFF,
- MPS_SINGLE,
- MPS_MULTIPLE,
-} mps = MPS_OFF;
-
static const char *supported_options[] = {
"Name",
"Class",
@@ -583,9 +577,11 @@ static void parse_config(GKeyFile *config)
DBG("MultiProfile=%s", str);
if (!strcmp(str, "single"))
- mps = MPS_SINGLE;
+ main_opts.mps = MPS_SINGLE;
else if (!strcmp(str, "multiple"))
- mps = MPS_MULTIPLE;
+ main_opts.mps = MPS_MULTIPLE;
+ else
+ main_opts.mps = MPS_OFF;
g_free(str);
}
@@ -910,8 +906,8 @@ int main(int argc, char *argv[])
main_opts.did_version);
}
- if (mps != MPS_OFF)
- register_mps(mps == MPS_MULTIPLE);
+ if (main_opts.mps != MPS_OFF)
+ register_mps(main_opts.mps == MPS_MULTIPLE);
/* Loading plugins has to be done after D-Bus has been setup since
* the plugins might wanna expose some paths on the bus. However the