Commit fe4954e6 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#13893: Fix without-iax2 configure option

parent 0d7c47a4
if USE_IAX
SUBDIRS = iax2
endif
EXTRA_DIST=pjproject
......@@ -5,31 +5,29 @@ libexec_PROGRAMS = sflphoned
if SFL_VIDEO
SFL_VIDEO_SUBDIR = video
SFL_VIDEO_LIB=./video/libvideo.la
endif
if BUILD_INSTANT_MESSAGING
INSTANT_MESSAGING_SUBDIR = im
IM_LIB=./im/libim.la
endif
SUBDIRS = dbus audio config hooks history sip iax $(INSTANT_MESSAGING_SUBDIR) $(SFL_VIDEO_SUBDIR)
sflphoned_SOURCES = main.cpp
# Redefine the USE_IAX variable here, so that it could be used in managerimpl
if USE_IAX
IAX_SUBDIR=iax
IAX_CXXFLAG=-DUSE_IAX
IAX_LIB=./iax/libiaxlink.la
else
IAX_CXXFLAG=
IAX_LIB=
IAX_LIB=./iax/libiaxlink.la $(top_builddir)/libs/iax2/libiax2.la
endif
if USE_NETWORKMANAGER
NETWORKMANAGER=-DUSE_NETWORKMANAGER
else
NETWORKMANAGER=
endif
SUBDIRS = dbus audio config hooks history sip $(IAX_SUBDIR) $(INSTANT_MESSAGING_SUBDIR) $(SFL_VIDEO_SUBDIR)
sflphoned_SOURCES = main.cpp
sflphoned_CXXFLAGS = \
-DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone\" $(IAX_CXXFLAG) $(NETWORKMANAGER) \
-DVERSION=\"$(VERSION)\"
......@@ -62,16 +60,7 @@ noinst_HEADERS = \
account_schema.h \
registration_states.h
if SFL_VIDEO
SFL_VIDEO_LIB=./video/libvideo.la
endif
if BUILD_INSTANT_MESSAGING
IM_LIB=./im/libim.la
endif
libsflphone_la_LIBADD = \
$(top_builddir)/libs/iax2/libiax2.la \
$(IAX_LIB) \
./sip/libsiplink.la \
./audio/libaudio.la \
......
......@@ -105,7 +105,7 @@ void InstantMessaging::send_sip_message(pjsip_inv_session *session, const std::s
sip_send(session, id, *iter);
}
#if HAVE_IAX
void InstantMessaging::send_iax_message(iax_session *session, const std::string &/* id */, const std::string &message)
{
std::vector<std::string> msgs(split_message(message));
......@@ -114,6 +114,7 @@ void InstantMessaging::send_iax_message(iax_session *session, const std::string
for (iter = msgs.begin(); iter != msgs.end(); ++iter)
iax_send_text(session, (*iter).c_str());
}
#endif
std::vector<std::string> InstantMessaging::split_message(std::string text)
......
......@@ -47,6 +47,8 @@
#include <iax-client.h>
#include "config.h"
#define EMPTY_MESSAGE pj_str((char*)"")
#define MAXIMUM_MESSAGE_LENGTH 1560 /* PJSIP's sip message limit */
......@@ -87,7 +89,9 @@ namespace InstantMessaging {
void sip_send(pjsip_inv_session*, const std::string& id, const std::string&);
void send_sip_message(pjsip_inv_session*, const std::string& id, const std::string&);
#if HAVE_IAX
void send_iax_message(iax_session *session, const std::string& id, const std::string&);
#endif
std::vector<std::string> split_message(std::string);
......
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