mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
* #6895: fix memleaks, cleanup in accountconfigdialog
This commit is contained in:
@ -62,7 +62,7 @@
|
|||||||
#include "widget/imwidget.h"
|
#include "widget/imwidget.h"
|
||||||
|
|
||||||
|
|
||||||
static GHashTable * ip2ip_profile=NULL;
|
static GHashTable * ip2ip_profile;
|
||||||
|
|
||||||
static gchar ** sflphone_order_history_hash_table(GHashTable *result)
|
static gchar ** sflphone_order_history_hash_table(GHashTable *result)
|
||||||
{
|
{
|
||||||
@ -1362,9 +1362,8 @@ sflphone_request_go_clear (void)
|
|||||||
{
|
{
|
||||||
callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
|
callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
|
||||||
|
|
||||||
if (selectedCall) {
|
if (selectedCall)
|
||||||
dbus_request_go_clear (selectedCall);
|
dbus_request_go_clear (selectedCall);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1384,37 +1383,3 @@ sflphone_call_state_changed (callable_obj_t * c, const gchar * description, cons
|
|||||||
update_actions();
|
update_actions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void sflphone_get_interface_addr_from_name (char *iface_name, char **iface_addr, int size)
|
|
||||||
{
|
|
||||||
|
|
||||||
struct ifreq ifr;
|
|
||||||
int fd;
|
|
||||||
// static char iface_addr[18];
|
|
||||||
char *tmp_addr;
|
|
||||||
|
|
||||||
struct sockaddr_in *saddr_in;
|
|
||||||
struct in_addr *addr_in;
|
|
||||||
|
|
||||||
if ( (fd = socket (AF_INET, SOCK_DGRAM,0)) < 0)
|
|
||||||
DEBUG ("getInterfaceAddrFromName error could not open socket\n");
|
|
||||||
|
|
||||||
memset (&ifr, 0, sizeof (struct ifreq));
|
|
||||||
|
|
||||||
strcpy (ifr.ifr_name, iface_name);
|
|
||||||
ifr.ifr_addr.sa_family = AF_INET;
|
|
||||||
|
|
||||||
if ( ioctl (fd, SIOCGIFADDR, &ifr) < 0)
|
|
||||||
DEBUG ("getInterfaceAddrFromName use default interface (0.0.0.0)\n");
|
|
||||||
|
|
||||||
|
|
||||||
saddr_in = (struct sockaddr_in *) &ifr.ifr_addr;
|
|
||||||
addr_in = & (saddr_in->sin_addr);
|
|
||||||
|
|
||||||
tmp_addr = (char *) addr_in;
|
|
||||||
|
|
||||||
snprintf (*iface_addr, size, "%d.%d.%d.%d",
|
|
||||||
UC (tmp_addr[0]), UC (tmp_addr[1]), UC (tmp_addr[2]), UC (tmp_addr[3]));
|
|
||||||
|
|
||||||
close (fd);
|
|
||||||
}
|
|
||||||
|
@ -35,13 +35,10 @@
|
|||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#include <accountlist.h>
|
#include "accountlist.h"
|
||||||
#include <codeclist.h>
|
#include "codeclist.h"
|
||||||
#include <sflphone_const.h>
|
#include "sflphone_const.h"
|
||||||
#include <conference_obj.h>
|
#include "conference_obj.h"
|
||||||
|
|
||||||
|
|
||||||
#define UC(b) (((int)b)&0xff)
|
|
||||||
|
|
||||||
/** @file actions.h
|
/** @file actions.h
|
||||||
* @brief General functions that change the state of the application.
|
* @brief General functions that change the state of the application.
|
||||||
@ -278,11 +275,6 @@ void sflphone_request_go_clear (void);
|
|||||||
*/
|
*/
|
||||||
void sflphone_call_state_changed (callable_obj_t * c, const gchar * description, const guint code);
|
void sflphone_call_state_changed (callable_obj_t * c, const gchar * description, const guint code);
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolve an interface address given its name
|
|
||||||
*/
|
|
||||||
void sflphone_get_interface_addr_from_name (char *iface_name, char **iface_addr, int size);
|
|
||||||
|
|
||||||
void sflphone_add_main_participant (const conference_obj_t * c);
|
void sflphone_add_main_participant (const conference_obj_t * c);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user