Version related changes.

git-svn-id: http://yate.null.ro/svn/yate/trunk@274 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2005-04-03 21:29:45 +00:00
parent 49ff961c9a
commit 7d3e4ba1e3
6 changed files with 39 additions and 66 deletions

View File

@ -77,7 +77,7 @@ distclean: check-topdir clean clean-config-files
cvsclean: check-topdir clean clean-tables clean-apidocs clean-config-files cvsclean: check-topdir clean clean-tables clean-apidocs clean-config-files
-rm -f configure -rm -f configure
.PHONY: engine contrib modules test apidocs-build check-topdir .PHONY: engine contrib modules test apidocs-build check-topdir windows
engine: tables library libyate.so $(PROGS) engine: tables library libyate.so $(PROGS)
apidocs-build: check-topdir apidocs-build: check-topdir
@ -122,6 +122,9 @@ yatepaths.h: $(MKDEPS)
@echo '#define MOD_PATH "$(DESTDIR)$(moddir)"' > $@ @echo '#define MOD_PATH "$(DESTDIR)$(moddir)"' > $@
@echo '#define CFG_PATH "$(DESTDIR)$(confdir)"' >> $@ @echo '#define CFG_PATH "$(DESTDIR)$(confdir)"' >> $@
windows: check-topdir
@cmp -s yateversn.h $@/yateversn.h || cp -p yateversn.h $@/yateversn.h
.PHONY: install install-root install-noapi install-api uninstall uninstall-root .PHONY: install install-root install-noapi install-api uninstall uninstall-root
install install-root: all apidocs install-noapi install-api install install-root: all apidocs install-noapi install-api
@ -187,7 +190,7 @@ uninstall uninstall-root:
install-root uninstall-root: LDCONFIG:=ldconfig install-root uninstall-root: LDCONFIG:=ldconfig
.PHONY: snapshot tarball .PHONY: snapshot tarball
snapshot tarball: check-topdir clean tables apidocs snapshot tarball: check-topdir clean tables windows apidocs
@if [ $@ = snapshot ]; then ver="`date '+CVS-%Y%m%d'`"; else ver="@PACKAGE_VERSION@"; fi ; \ @if [ $@ = snapshot ]; then ver="`date '+CVS-%Y%m%d'`"; else ver="@PACKAGE_VERSION@"; fi ; \
wd=`pwd|sed 's,^.*/,,'`; \ wd=`pwd|sed 's,^.*/,,'`; \
mkdir -p tarballs; cd ..; \ mkdir -p tarballs; cd ..; \

View File

@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_INIT(YATE, 0.8.8) AC_INIT(YATE, 0.9.0)
AC_CONFIG_SRCDIR([README]) AC_CONFIG_SRCDIR([README])
AC_PREREQ(2.52) AC_PREREQ(2.52)

View File

@ -29,8 +29,6 @@
using namespace TelEngine; using namespace TelEngine;
static Mutex s_mutex(true);
static ObjList s_calls;
static Configuration s_cfg; static Configuration s_cfg;
static bool s_runs = false; static bool s_runs = false;
static int s_total = 0; static int s_total = 0;
@ -85,18 +83,6 @@ public:
virtual void run(); virtual void run();
}; };
class ConnHandler : public MessageReceiver
{
public:
enum {
Ringing,
Answered,
Execute,
Drop,
};
virtual bool received(Message &msg, int id);
};
class CmdHandler : public MessageReceiver class CmdHandler : public MessageReceiver
{ {
public: public:
@ -126,21 +112,17 @@ GenConnection::GenConnection(const String& callto)
: Channel(__plugin), m_callto(callto) : Channel(__plugin), m_callto(callto)
{ {
m_start = Time::now(); m_start = Time::now();
m_status = "calling"; status("calling");
s_mutex.lock(); driver()->lock();
s_calls.append(this);
m_id << "callgen/" << ++s_total;
++s_current; ++s_current;
s_mutex.unlock(); driver()->unlock();
} }
GenConnection::~GenConnection() GenConnection::~GenConnection()
{ {
m_status = "destroyed"; driver()->lock();
s_mutex.lock();
s_calls.remove(this,false);
--s_current; --s_current;
s_mutex.unlock(); driver()->unlock();
} }
GenConnection* GenConnection::find(const String& id) GenConnection* GenConnection::find(const String& id)
@ -243,39 +225,13 @@ void GenConnection::makeSource()
s_mutex.unlock(); s_mutex.unlock();
if (src) { if (src) {
Message m("chan.attach"); Message m("chan.attach");
m.addParam("id",m_id); complete(m,false);
m.addParam("source",src); m.addParam("source",src);
m.userData(this); m.userData(this);
Engine::dispatch(m); Engine::dispatch(m);
} }
} }
bool ConnHandler::received(Message &msg, int id)
{
String callid(msg.getValue("targetid"));
if (!callid.startsWith("callgen/",false))
return false;
GenConnection *conn = GenConnection::find(callid);
if (!conn) {
Debug(DebugInfo,"Target '%s' was not found in list",callid.c_str());
return false;
}
String text(msg.getValue("text"));
switch (id) {
case Answered:
conn->answered();
break;
case Ringing:
conn->ringing();
break;
case Execute:
break;
case Drop:
break;
}
return true;
}
void GenThread::run() void GenThread::run()
{ {
for (;;) { for (;;) {
@ -442,7 +398,6 @@ CallGenPlugin::CallGenPlugin()
CallGenPlugin::~CallGenPlugin() CallGenPlugin::~CallGenPlugin()
{ {
Output("Unloading module Call Generator"); Output("Unloading module Call Generator");
s_calls.clear();
} }
void CallGenPlugin::initialize() void CallGenPlugin::initialize()
@ -453,12 +408,6 @@ void CallGenPlugin::initialize()
if (m_first) { if (m_first) {
m_first = false; m_first = false;
ConnHandler* coh = new ConnHandler;
Engine::install(new MessageRelay("call.ringing",coh,ConnHandler::Ringing));
Engine::install(new MessageRelay("call.answered",coh,ConnHandler::Answered));
Engine::install(new MessageRelay("call.execute",coh,ConnHandler::Execute));
Engine::install(new MessageRelay("call.drop",coh,ConnHandler::Drop));
CmdHandler* cmh = new CmdHandler; CmdHandler* cmh = new CmdHandler;
Engine::install(new MessageRelay("engine.status",cmh,CmdHandler::Status)); Engine::install(new MessageRelay("engine.status",cmh,CmdHandler::Status));
Engine::install(new MessageRelay("engine.command",cmh,CmdHandler::Command)); Engine::install(new MessageRelay("engine.command",cmh,CmdHandler::Command));

View File

@ -9,12 +9,19 @@
#ifndef __YATEVERSN_H #ifndef __YATEVERSN_H
#define __YATEVERSN_H #define __YATEVERSN_H
/* Version numbers */
#define YATE_MAJOR 0 #define YATE_MAJOR 0
#define YATE_MINOR 8 #define YATE_MINOR 9
#define YATE_BUILD 8 #define YATE_BUILD 0
/* Version strings */
#define YATE_MAJOR_S "0" #define YATE_MAJOR_S "0"
#define YATE_MINOR_S "8" #define YATE_MINOR_S "9"
#define YATE_BUILD_S "8" #define YATE_BUILD_S "0"
#define YATE_VERSION "0.8.8" #define YATE_VERSION "0.9.0"
/* Windows version resource - file and string style */
#define YATE_WINVER_F 0,9,0,0
#define YATE_WINVER_S "0, 9, 0\0"
#endif /* __YATEVERSN_H */ #endif /* __YATEVERSN_H */

View File

@ -1268,10 +1268,17 @@ public:
/** /**
* Get the next unique numeric id from a sequence * Get the next unique numeric id from a sequence
* @return A dierv unique number that increments by 1 at each call * @return A driver unique number that increments by 1 at each call
*/ */
unsigned int nextid(); unsigned int nextid();
/**
* Get the current (last used) unique numeric id from a sequence
* @return The driver unique number
*/
inline unsigned int lastid() const
{ return m_nextid; }
protected: protected:
/** /**
* Constructor * Constructor

View File

@ -9,12 +9,19 @@
#ifndef __YATEVERSN_H #ifndef __YATEVERSN_H
#define __YATEVERSN_H #define __YATEVERSN_H
/* Version numbers */
#define YATE_MAJOR @PACKAGE_VERSION_MAJOR@ #define YATE_MAJOR @PACKAGE_VERSION_MAJOR@
#define YATE_MINOR @PACKAGE_VERSION_MINOR@ #define YATE_MINOR @PACKAGE_VERSION_MINOR@
#define YATE_BUILD @PACKAGE_VERSION_BUILD@ #define YATE_BUILD @PACKAGE_VERSION_BUILD@
/* Version strings */
#define YATE_MAJOR_S "@PACKAGE_VERSION_MAJOR@" #define YATE_MAJOR_S "@PACKAGE_VERSION_MAJOR@"
#define YATE_MINOR_S "@PACKAGE_VERSION_MINOR@" #define YATE_MINOR_S "@PACKAGE_VERSION_MINOR@"
#define YATE_BUILD_S "@PACKAGE_VERSION_BUILD@" #define YATE_BUILD_S "@PACKAGE_VERSION_BUILD@"
#define YATE_VERSION "@PACKAGE_VERSION@" #define YATE_VERSION "@PACKAGE_VERSION@"
/* Windows version resource - file and string style */
#define YATE_WINVER_F @PACKAGE_VERSION_MAJOR@,@PACKAGE_VERSION_MINOR@,@PACKAGE_VERSION_BUILD@,0
#define YATE_WINVER_S "@PACKAGE_VERSION_MAJOR@, @PACKAGE_VERSION_MINOR@, @PACKAGE_VERSION_BUILD@\0"
#endif /* __YATEVERSN_H */ #endif /* __YATEVERSN_H */