aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/loopback.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/loopback.c')
-rw-r--r--backends/loopback.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/backends/loopback.c b/backends/loopback.c
index c2c3430..085d1df 100644
--- a/backends/loopback.c
+++ b/backends/loopback.c
@@ -1,8 +1,8 @@
+#define BACKEND_NAME "loopback"
+
#include <string.h>
#include "loopback.h"
-#define BACKEND_NAME "loopback"
-
MM_PLUGIN_API int init(){
backend loopback = {
.name = BACKEND_NAME,
@@ -18,7 +18,7 @@ MM_PLUGIN_API int init(){
//register backend
if(mm_backend_register(loopback)){
- fprintf(stderr, "Failed to register loopback backend\n");
+ LOG("Failed to register backend");
return 1;
}
return 0;
@@ -42,7 +42,7 @@ static instance* loopback_instance(){
i->impl = calloc(1, sizeof(loopback_instance_data));
if(!i->impl){
- fprintf(stderr, "Failed to allocate memory\n");
+ LOG("Failed to allocate memory");
return NULL;
}
@@ -64,13 +64,13 @@ static channel* loopback_channel(instance* inst, char* spec, uint8_t flags){
if(u == data->n){
data->name = realloc(data->name, (u + 1) * sizeof(char*));
if(!data->name){
- fprintf(stderr, "Failed to allocate memory\n");
+ LOG("Failed to allocate memory");
return NULL;
}
data->name[u] = strdup(spec);
if(!data->name[u]){
- fprintf(stderr, "Failed to allocate memory\n");
+ LOG("Failed to allocate memory");
return NULL;
}
data->n++;
@@ -109,6 +109,6 @@ static int loopback_shutdown(size_t n, instance** inst){
free(inst[u]->impl);
}
- fprintf(stderr, "Loopback backend shut down\n");
+ LOG("Backend shut down");
return 0;
}