Skip to content

Commit

Permalink
Actually return the interface instead of just strdupping the value
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Sep 12, 2013
1 parent 16fa7a8 commit fa9fca9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/usb_moded-network.c
Expand Up @@ -32,6 +32,7 @@

#include "usb_moded-network.h"
#include "usb_moded-config.h"
#include "usb_moded-log.h"

#if CONNMAN
#include <dbus/dbus.h>
Expand All @@ -49,11 +50,7 @@ static char* get_interface(struct mode_list_elem *data)
{
if(data->network_interface)
{
/*
interface = malloc(32*sizeof(char));
strncpy(interface, data->network_interface, 32);
*/
strdup(data->network_interface);
interface = strdup(data->network_interface);
}
}
else
Expand All @@ -65,6 +62,7 @@ static char* get_interface(struct mode_list_elem *data)
strncpy(interface, default_interface, sizeof(default_interface));
}

log_debug("interface = %s\n", interface);
return interface;
}

Expand Down

0 comments on commit fa9fca9

Please sign in to comment.