aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/artnet.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-11 23:24:23 +0100
committercbdev <cb@cbcdn.com>2019-12-11 23:24:23 +0100
commit9624d46436576b415c639ea7390012cdd95c88f7 (patch)
treefb3aadbaf01fcee5da8ecdb8355ff191341b666d /backends/artnet.c
parent48e12201f5c57cda581bc0c713d99da6524c49a8 (diff)
parentf6d6eefe9bb9934f4fa3e665734d746f02471cdb (diff)
downloadmidimonster-9624d46436576b415c639ea7390012cdd95c88f7.tar.gz
midimonster-9624d46436576b415c639ea7390012cdd95c88f7.tar.bz2
midimonster-9624d46436576b415c639ea7390012cdd95c88f7.zip
Merge branch 'master' into rtpmidi
Diffstat (limited to 'backends/artnet.c')
-rw-r--r--backends/artnet.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/backends/artnet.c b/backends/artnet.c
index e01f038..b181296 100644
--- a/backends/artnet.c
+++ b/backends/artnet.c
@@ -381,28 +381,15 @@ static int artnet_handle(size_t num, managed_fd* fds){
return 0;
}
-static int artnet_start(){
- size_t n, u, p;
+static int artnet_start(size_t n, instance** inst){
+ size_t u, p;
int rv = 1;
- instance** inst = NULL;
artnet_instance_data* data = NULL;
artnet_instance_id id = {
.label = 0
};
- //fetch all defined instances
- if(mm_backend_instances(BACKEND_NAME, &n, &inst)){
- fprintf(stderr, "Failed to fetch instance list\n");
- return 1;
- }
-
- if(!n){
- free(inst);
- return 0;
- }
-
if(!artnet_fds){
- free(inst);
fprintf(stderr, "Failed to start ArtNet backend: no descriptors bound\n");
return 1;
}
@@ -448,22 +435,15 @@ static int artnet_start(){
rv = 0;
bail:
- free(inst);
return rv;
}
-static int artnet_shutdown(){
- size_t n, p;
- instance** inst = NULL;
- if(mm_backend_instances(BACKEND_NAME, &n, &inst)){
- fprintf(stderr, "Failed to fetch instance list\n");
- return 1;
- }
+static int artnet_shutdown(size_t n, instance** inst){
+ size_t p;
for(p = 0; p < n; p++){
free(inst[p]->impl);
}
- free(inst);
for(p = 0; p < artnet_fds; p++){
close(artnet_fd[p].fd);