Skip to content
Snippets Groups Projects
Commit 1f860a19 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Remove compilation warnings

parent 57b5d5cb
No related branches found
No related tags found
No related merge requests found
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -52,7 +53,6 @@ void update_menus()
gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),FALSE);
gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), FALSE);
gtk_widget_set_sensitive( GTK_WIDGET(copyMenu), FALSE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(holdMenu), FALSE);
call_t * selectedCall = call_get_selected(active_calltree);
if (selectedCall)
......@@ -68,7 +68,7 @@ void update_menus()
gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),TRUE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(holdMenu), TRUE);
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg"));
break;
case CALL_STATE_RINGING:
gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), TRUE);
......@@ -83,6 +83,7 @@ void update_menus()
gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),TRUE);
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg"));
break;
case CALL_STATE_BUSY:
case CALL_STATE_FAILURE:
......@@ -143,9 +144,6 @@ create_help_menu()
menu = gtk_menu_new ();
/*menu_items = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
*/
menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_ABOUT, get_accel_group());
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
g_signal_connect_swapped (G_OBJECT (menu_items), "activate",
......@@ -498,7 +496,7 @@ create_edit_menu()
}
/* ----------------------------------------------------------------- */
static void
view_dialpad (GtkCheckMenuItem *checkmenuitem,
view_dialpad (GtkImageMenuItem *imagemenuitem,
void* foo)
{
gboolean state;
......@@ -516,7 +514,7 @@ view_dialpad (GtkCheckMenuItem *checkmenuitem,
}
static void
view_volume_controls (GtkCheckMenuItem *checkmenuitem,
view_volume_controls (GtkImageMenuItem *imagemenuitem,
void* foo)
{
gboolean state;
......
......@@ -26,7 +26,7 @@
#include "audio/audiolayer.h"
#include <samplerate.h>
#include <iax/iax-client.h>
//#include <iax/iax-client.h>
#include <math.h>
#include <dlfcn.h>
......@@ -165,6 +165,7 @@ IAXVoIPLink::terminate()
void
IAXVoIPLink::terminateIAXCall()
{
std::string reason = "Dumped Call";
ost::MutexLock m(_callMapMutex);
CallMap::iterator iter = _callMap.begin();
IAXCall *call;
......@@ -172,7 +173,7 @@ IAXVoIPLink::terminateIAXCall()
call = dynamic_cast<IAXCall*>(iter->second);
if (call) {
_mutexIAX.enterMutex();
iax_hangup(call->getSession(), "Dumped Call");
iax_hangup(call->getSession(), (char*)reason.c_str());
_mutexIAX.leaveMutex();
call->setSession(NULL);
delete call; call = NULL;
......@@ -480,11 +481,11 @@ bool
IAXVoIPLink::hangup(const CallID& id)
{
IAXCall* call = getIAXCall(id);
std::string reason = "Dumped Call";
CHK_VALID_CALL;
_mutexIAX.enterMutex();
iax_hangup(call->getSession(), "Dumped Call");
iax_hangup(call->getSession(), (char*) reason.c_str());
_mutexIAX.leaveMutex();
call->setSession(NULL);
if (Manager::instance().isCurrentCall(id)) {
......@@ -549,11 +550,12 @@ bool
IAXVoIPLink::refuse(const CallID& id)
{
IAXCall* call = getIAXCall(id);
std::string reason = "Call rejected manually.";
CHK_VALID_CALL;
_mutexIAX.enterMutex();
iax_reject(call->getSession(), "Call rejected manually.");
iax_reject(call->getSession(), (char*) reason.c_str());
_mutexIAX.leaveMutex();
removeCall(id);
}
......@@ -849,6 +851,7 @@ IAXVoIPLink::iaxHandlePrecallEvent(iax_event* event)
{
IAXCall* call = NULL;
CallID id;
std::string reason = "Error ringing user.";
switch(event->etype) {
case IAX_EVENT_REGACK:
......@@ -910,7 +913,7 @@ IAXVoIPLink::iaxHandlePrecallEvent(iax_event* event)
addCall(call);
} else {
// reject call, unable to add it
iax_reject(event->session, "Error ringing user.");
iax_reject(event->session, (char*)reason.c_str());
delete call; call = NULL;
}
......
......@@ -607,6 +607,7 @@ ManagerImpl::peerHungupCall(const CallID& id)
if (accountid == AccountNULL) {
_debug("peerHungupCall: Call doesn't exists\n");
return;
}
if (_dbus) _dbus->getCallManager()->callStateChanged(id, "HUNGUP");
if (isCurrentCall(id)) {
......@@ -615,7 +616,7 @@ ManagerImpl::peerHungupCall(const CallID& id)
}
removeWaitingCall(id);
removeCallAccount(id);
}
}
//THREAD=VoIP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment