Work around API changes introduced by newer bristuff patches.

git-svn-id: http://voip.null.ro/svn/yate@951 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2006-07-06 12:08:07 +00:00
parent 293fe7cd09
commit 598845b7c3
2 changed files with 23 additions and 0 deletions

View File

@ -55,6 +55,22 @@ static int s_buflen = 160;
#ifdef PRI_NEW_SET_API
#ifdef BRI_NETWORK_PTMP
// bristuff patch changed the error reporting for no good reason
static void pri_err_cb(char *s, int span)
{
Debug("libpri",DebugWarn,"Span %d: %s",span,s);
}
static void pri_msg_cb(char *s, int span)
{
Debug("libpri",DebugInfo,"Span %d: %s",span,s);
}
#else
static void pri_err_cb(struct pri *pri, char *s)
{
PriSpan* span = pri ? (PriSpan*)::pri_get_userdata(pri) : 0;
@ -73,6 +89,8 @@ static void pri_msg_cb(struct pri *pri, char *s)
Debug("libpri",DebugInfo,"%s",s);
}
#endif // BRI_NETWORK_PTMP
#else
static void pri_err_cb(char *s)

View File

@ -467,7 +467,12 @@ PriSpan* ZapDriver::createSpan(PriDriver* driver, int span, int first, int chans
int fd = zt_open_dchan(dchan+first-1);
if (fd < 0)
return 0;
#if defined(PRI_NEW_SET_API) && defined(BRI_NETWORK_PTMP)
// Klaus-Peter Junghanns broke this one too
pri* p = ::pri_new(fd,netType,swType,span);
#else
pri* p = ::pri_new(fd,netType,swType);
#endif
if (!p)
return 0;
ZapSpan *zs = new ZapSpan(p,driver,span,first,chans,dchan,cfg,sect,fd);