1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
From: Andrej Shadura <andrewsh@debian.org>
Date: Mon, 4 Jan 2021 18:28:18 +0100
Subject: Allocate mixerdevice only once
---
src/osdsh/controlsh.c | 6 ------
src/osdsh/osdsh.c | 1 +
src/osdsh/osdsh.h | 2 +-
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/osdsh/controlsh.c b/src/osdsh/controlsh.c
index da00aa4..4c9115b 100644
--- a/src/osdsh/controlsh.c
+++ b/src/osdsh/controlsh.c
@@ -15,9 +15,6 @@ int load_plugin( char pluginfile[255])
char file[PATH_MAX+256];
char *msg = NULL;
- char **mod_mixerdev;
-
-
/* getcwd(file, PATH_MAX);
strcat(file, "/");
*/
@@ -43,9 +40,6 @@ int load_plugin( char pluginfile[255])
info = dlsym(module, "mynameis");
- mod_mixerdev = dlsym(module, "mixerdevice");
- *mod_mixerdev = mixerdevice;
-
plugins[a].module = module;
plugins[a].whoami = a;
plugins[a].file = file;
diff --git a/src/osdsh/osdsh.c b/src/osdsh/osdsh.c
index 0dd30fc..a3e0654 100644
--- a/src/osdsh/osdsh.c
+++ b/src/osdsh/osdsh.c
@@ -1,6 +1,7 @@
#include "osdsh.h"
#include "../config.h"
+char mixerdevice[PATH_MAX + 1];
/* ==============================global variables=============================*/
/*
diff --git a/src/osdsh/osdsh.h b/src/osdsh/osdsh.h
index 62802be..5297cce 100644
--- a/src/osdsh/osdsh.h
+++ b/src/osdsh/osdsh.h
@@ -46,4 +46,4 @@ typedef struct plugininfo_t {
} plugininfo_t;
/* HACK */
-char mixerdevice[PATH_MAX + 1];
+extern char mixerdevice[PATH_MAX + 1];
|