Commit 169a8aa5 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#2802] Code indentation

parent 34bc4f6c
......@@ -413,18 +413,18 @@ CallManager::setPBXEnrollment (const std::string& callID, const bool& yesNo) {
}
void
void
CallManager::sendTextMessage (const std::string& callID, const std::string& message) {
_debug ("");
_debug ("");
SIPVoIPLink * link = NULL;
SIPVoIPLink * link = NULL;
link = dynamic_cast<SIPVoIPLink *> (Manager::instance().getAccountLink (AccountNULL));
if (link == NULL) {
_debug ("Failed to get sip link");
throw CallManagerException();
}
if (link == NULL) {
_debug ("Failed to get sip link");
throw CallManagerException();
}
link->sendTextMessage (callID, message);
link->sendTextMessage (callID, message);
}
......@@ -1616,7 +1616,7 @@ bool ManagerImpl::incomingCall (Call* call, const AccountID& accountId) {
//THREAD=VoIP
void ManagerImpl::incomingMessage (const CallID& callID,
const std::string& from,
const std::string& from,
const std::string& message) {
if (_dbus) {
_dbus->getCallManager()->incomingMessage (callID, from, message);
......
......@@ -113,7 +113,7 @@ pj_status_t InstantMessaging::send (pjsip_inv_session *session, CallID& id, cons
// Archive the message
this->saveMessage (text, "Me", id);
printf ("SIPVoIPLink::sendTextMessage %s %s\n", id.c_str(), text.c_str());
printf ("SIPVoIPLink::sendTextMessage %s %s\n", id.c_str(), text.c_str());
return PJ_SUCCESS;
}
......
......@@ -1043,24 +1043,24 @@ SIPVoIPLink::onhold (const CallID& id) {
return true;
}
bool
bool
SIPVoIPLink::sendTextMessage (const std::string& callID, const std::string& message) {
SIPCall *call = getSIPCall (callID);
pj_status_t status = !PJ_SUCCESS;
SIPCall *call = getSIPCall (callID);
pj_status_t status = !PJ_SUCCESS;
if (call) {
/* Send IM message */
status = imModule->send (call->getInvSession (), (CallID&)callID, message);
}
else {
/* Notify the client of an error */
if (call) {
/* Send IM message */
status = imModule->send (call->getInvSession (), (CallID&) callID, message);
} else {
/* Notify the client of an error */
/*Manager::instance ().incomingMessage ( "",
"sflphoned",
"Unable to send a message outside a call.");*/
}
return status;
"sflphoned",
"Unable to send a message outside a call.");*/
}
return status;
}
int SIPVoIPLink::inv_session_reinvite (SIPCall *call, std::string direction) {
......@@ -3372,9 +3372,9 @@ void call_on_tsx_changed (pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_
// Pass through the instant messaging module if needed
// Right now, it does do anything.
// And notify the clients
Manager::instance ().incomingMessage ( call->getCallId (),
call->getPeerNumber (),
imModule->receive (message, call->getPeerNumber (), call->getCallId ()));
Manager::instance ().incomingMessage (call->getCallId (),
call->getPeerNumber (),
imModule->receive (message, call->getPeerNumber (), call->getCallId ()));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment