From 5dbbe0e7ab9f1d562e4f63bdf6fd559e9967f112 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Fri, 16 Feb 2007 10:23:24 +0000 Subject: [PATCH] fixed compilation errors occuring on my desktop ;-) More of them are needed to fix also the py_sems problem. git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@230 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/py_sems/Makefile | 17 +++++++++-------- apps/py_sems/sip/Makefile | 6 +++++- apps/registrar_client/SIPRegistrarClient.cpp | 2 +- apps/registrar_client/SIPRegistrarClient.h | 2 +- core/AmRtpPacket.cpp | 4 ++-- core/plug-in/Makefile.app_module | 4 ++-- core/plug-in/uac_auth/UACAuth.h | 2 +- 7 files changed, 21 insertions(+), 16 deletions(-) diff --git a/apps/py_sems/Makefile b/apps/py_sems/Makefile index 18374113..6cbd05c1 100644 --- a/apps/py_sems/Makefile +++ b/apps/py_sems/Makefile @@ -39,9 +39,9 @@ ifeq ($(TTS), y) # uncomment the next lines if you want to have flite text-to-speech (ivr.say("Hello there"); ) FLITE_DIR = /usr/src/flite-1.2-release ALT_FLITE_DIR = /usr/include/flite -IVR_TTS_module_ldflags = -L$(FLITE_DIR)/lib -lm -lflite_cmu_us_kal -lflite_usenglish \ +PY_SEMS_TTS_module_ldflags = -L$(FLITE_DIR)/lib -lm -lflite_cmu_us_kal -lflite_usenglish \ -lflite_cmulex -lflite -IVR_TTS_module_cflags = -I$(FLITE_DIR)/include -I$(ALT_FLITE_DIR) -DIVR_WITH_TTS +PY_SEMS_TTS_module_cflags = -I$(FLITE_DIR)/include -I$(ALT_FLITE_DIR) -DPY_SEMS_WITH_TTS endif LOCAL_INCLUDES = -I$(FLITE_DIR)/lang/usenglish @@ -49,15 +49,11 @@ LOCAL_INCLUDES = -I$(FLITE_DIR)/lang/usenglish # On FreeBSD, remove the following flags: -ldl -lpthread module_ldflags = -ldl -lpthread -lutil -lm \ $(PYTHON_module_ldflags) \ - $(IVR_TTS_module_ldflags) + $(PY_SEMS_TTS_module_ldflags) -# for perl support: -# -DIVR_PERL `perl -MExtUtils::Embed -e ccopts ` -# for flite text-to-speech support -DIVR_WITH_TTS module_cflags = \ $(PYTHON_module_cflags) \ - $(IVR_TTS_module_cflags) \ - $(PERL_module_cflags) \ + $(PY_SEMS_TTS_module_cflags) \ $(module_additional_cflags) extra_target = python_files @@ -81,6 +77,8 @@ python_files: endif +extra_clean = clean_py_sems_lib + include $(COREPATH)/plug-in/Makefile.app_module .PHONY: install_python_files @@ -93,3 +91,6 @@ install_python_files: $(modules-prefix)/$(modules-dir) fi ; \ done +.PHONY: clean_py_sems_lib +clean_py_sems_lib: + cd sip; $(MAKE) clean \ No newline at end of file diff --git a/apps/py_sems/sip/Makefile b/apps/py_sems/sip/Makefile index 385cbd93..1e144940 100644 --- a/apps/py_sems/sip/Makefile +++ b/apps/py_sems/sip/Makefile @@ -10,7 +10,11 @@ all: py_sems.so .PHONY: clean clean: - $(MAKE) -f Makefile.gen clean; \ + $(MAKE) -f Makefile.gen clean + + +.PHONY: cleaner +cleaner: clean rm -f *.cpp *.h *.sbf *~ Makefile.gen: configure.py $(SIP_FILES) diff --git a/apps/registrar_client/SIPRegistrarClient.cpp b/apps/registrar_client/SIPRegistrarClient.cpp index 9e15c7e0..a0cee40d 100644 --- a/apps/registrar_client/SIPRegistrarClient.cpp +++ b/apps/registrar_client/SIPRegistrarClient.cpp @@ -301,7 +301,7 @@ bool SIPRegistration::registerSendTimeout(time_t now_sec) { bool SIPRegistration::timeToReregister(time_t now_sec) { // if (active) // DBG("compare %lu with %lu\n",(reg_begin+reg_expires), (unsigned long)now_sec); - return ((reg_begin+reg_expires/2) < (unsigned long)now_sec); + return (((unsigned long)reg_begin+reg_expires/2) < (unsigned long)now_sec); } bool SIPRegistration::registerExpired(time_t now_sec) { diff --git a/apps/registrar_client/SIPRegistrarClient.h b/apps/registrar_client/SIPRegistrarClient.h index 36da8e7c..4dadc862 100644 --- a/apps/registrar_client/SIPRegistrarClient.h +++ b/apps/registrar_client/SIPRegistrarClient.h @@ -171,7 +171,7 @@ class SIPRegistrarClient : public AmSIPEventHandler, public: SIPRegistrarClient(const string& name); // DI factory - SIPRegistrarClient* getInstance() { return instance(); } + AmDynInvoke* getInstance() { return instance(); } // DI API static SIPRegistrarClient* instance(); void invoke(const string& method, diff --git a/core/AmRtpPacket.cpp b/core/AmRtpPacket.cpp index eba770a8..65200b2e 100644 --- a/core/AmRtpPacket.cpp +++ b/core/AmRtpPacket.cpp @@ -106,11 +106,11 @@ int AmRtpPacket::parse() d_size = b_size - data_offset; if(hdr->p){ - if (buffer[d_size-1]>=d_size){ + if (buffer[b_size-1]>=d_size){ ERROR("bad rtp packet (invalid padding size) !\n"); return -1; } - d_size -= buffer[data_offset+d_size-1]; + d_size -= buffer[b_size-1]; } return 0; diff --git a/core/plug-in/Makefile.app_module b/core/plug-in/Makefile.app_module index a29f383f..f4c5521d 100644 --- a/core/plug-in/Makefile.app_module +++ b/core/plug-in/Makefile.app_module @@ -32,8 +32,8 @@ module_package: $(extra_target) .PHONY: clean -clean: - -@rm -f $(objs) $(depends) $(lib_name) $(extra_clean) +clean: $(extra_clean) + -@rm -f $(objs) $(depends) $(lib_name) .PHONY: deps deps: $(depends) $(extra_depends) diff --git a/core/plug-in/uac_auth/UACAuth.h b/core/plug-in/uac_auth/UACAuth.h index f1673192..22347fae 100644 --- a/core/plug-in/uac_auth/UACAuth.h +++ b/core/plug-in/uac_auth/UACAuth.h @@ -74,7 +74,7 @@ public: bool onInvite(const AmSipRequest&); static UACAuthFactory* instance(); - UACAuthFactory* getInstance() { return instance(); } + AmDynInvoke* getInstance() { return instance(); } void invoke(const string& method, const AmArgArray& args, AmArgArray& ret); };