Author: arekm                        Date: Mon Feb 11 08:45:45 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- separate bristuffed version

---- Files affected:
SOURCES:
   libpri-bristuff.patch (1.1 -> NONE)  (REMOVED), 
libpri-bristuff-libname.patch (NONE -> 1.1)  (NEW), 
libpri-bristuff-bristuff.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/libpri-bristuff-libname.patch
diff -u /dev/null SOURCES/libpri-bristuff-libname.patch:1.1
--- /dev/null   Mon Feb 11 09:45:45 2008
+++ SOURCES/libpri-bristuff-libname.patch       Mon Feb 11 09:45:40 2008
@@ -0,0 +1,106 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## enable-gcc-optimizations.dpatch by Faidon Liambotis <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't discard CFLAGS of the environment
+## DP: debian/rules passes at least the optimization level
+
[EMAIL PROTECTED]@
+diff -urNad libpri-1.4.1~/Makefile libpri-1.4.1/Makefile
+--- libpri-1.4.1~/Makefile     2006-12-30 21:17:34.000000000 +0200
++++ libpri-1.4.1/Makefile      2007-08-07 04:15:59.000000000 +0300
+@@ -36,7 +36,7 @@
+ DYNAMIC_LIBRARY=libpri.so.1.0
+ STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
+ DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
+-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC 
$(ALERTING) $(LIBPRI_COUNTERS)
++CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC 
$(ALERTING) $(LIBPRI_COUNTERS)
+ INSTALL_PREFIX=$(DESTDIR)
+ INSTALL_BASE=/usr
+ SOFLAGS = -Wl,-hlibpri.so.1.0
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## libname.dpatch by  <tzafrir@>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: allows using a different name for the library rather than libpri
+## DP: if LIB_SUF is set in the environment/makefile params it will install
+## DP: the headers under /usr/include/$(LIB_SUF)/libpri.h and call the library 
+## DP: libpri-$(LIB_SUF).so.1
+
[EMAIL PROTECTED]@
+diff -urNad libpri-1.2.3~/Makefile libpri-1.2.3/Makefile
+--- libpri-1.2.3~/Makefile     2006-04-30 15:17:47.000000000 +0000
++++ libpri-1.2.3/Makefile      2006-06-10 13:48:23.000000000 +0000
+@@ -32,14 +32,20 @@
+ OSARCH=$(shell uname -s)
+ PROC?=$(shell uname -m)
+ 
++ifdef LIB_SUF
++LIBNAME=pri-$(LIB_SUF)
++else
++LIBNAME=pri
++endif
+-STATIC_LIBRARY=libpri.a
+-DYNAMIC_LIBRARY=libpri.so.1.0
++STATIC_LIBRARY=lib$(LIBNAME).a
++DYNAMIC_LIBRARY=lib$(LIBNAME).so.1.0
+ STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
+ DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
+ CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC 
$(ALERTING) $(LIBPRI_COUNTERS)
+ INSTALL_PREFIX=$(DESTDIR)
+ INSTALL_BASE=/usr
+-SOFLAGS = -Wl,-hlibpri.so.1.0
++INCLUDE_DIR=$(INSTALL_PREFIX)$(INSTALL_BASE)/include/$(LIB_SUF)
++SOFLAGS = -Wl,-hlib$(LIBNAME).so.1.0
+ LDCONFIG = /sbin/ldconfig
+ ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX))
+ LDCONFIG_FLAGS=-n
+@@ -55,7 +61,7 @@
+ CFLAGS += -DSOLARIS -I../zaptel-solaris
+ LDCONFIG = 
+ LDCONFIG_FLAGS = \# # Trick to comment out the period in the command below
+-SOSLINK = ln -sf libpri.so.1.0 libpri.so.1
++SOSLINK = ln -sf lib$(LIBNAME).so.1.0 lib$(LIBNAME).so.1
+ #INSTALL_PREFIX = /opt/asterisk  # Uncomment out to install in standard 
Solaris location for 3rd party code
+ endif
+ 
+@@ -82,29 +88,28 @@
+ 
+ install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
+       mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
+-      mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include
++      mkdir -p $(INCLUDE_DIR)
++      install -m 644 libpri.h $(INCLUDE_DIR)
+ ifneq (${OSARCH},SunOS)
+-      install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
+       install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
+       if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux 
status:" | grep -q "enabled"); then /sbin/restorecon -v 
$(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi
+-      ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 
libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 )
++      ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf lib$(LIBNAME).so.1.0 
lib$(LIBNAME).so ; ln -sf lib$(LIBNAME).so.1.0 lib$(LIBNAME).so.1 )
+       install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
+-      if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) 
$(INSTALL_PREFIX)$(INSTALL_BASE)/lib; fi
+ else
+       install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
+       install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 
$(DYNAMIC_LIBRARY)
+-      ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 
libpri.so ; $(SOSLINK) )
++      ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf lib$(LIBNAME).so.1.0 
lib$(LIBNAME).so ; $(SOSLINK) )
+       install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 644 $(STATIC_LIBRARY)
+ endif
+ 
+ uninstall:
+       @echo "Removing Libpri"
+-      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1.0
+-      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1
+-      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so
+-      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.a
+-      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libpri.h
+-
++      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).so.1.0
++      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).so.1
++      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).so
++      rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).a
++      rm -f $(INCLUDE_DIR)/libpri.h
++  
+ pritest: pritest.o
+       $(CC) -o pritest pritest.o -L. -lpri -lzap $(CFLAGS)
+ 

================================================================
Index: SOURCES/libpri-bristuff-bristuff.patch
diff -u /dev/null SOURCES/libpri-bristuff-bristuff.patch:1.1
--- /dev/null   Mon Feb 11 09:45:45 2008
+++ SOURCES/libpri-bristuff-bristuff.patch      Mon Feb 11 09:45:40 2008
@@ -0,0 +1,6100 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bristuff.dpatch by Tzafrir Cohen <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: The libpri part of bristuff, version bristuff-0.4.0-test4
+## DP: http://www.junghanns.net/en/download.html
+## DP:
+## DP: newer versions: replace the contets of the patch file literally.
+## DP: The remove Makefile and the strange changes this libpri.patch makes to 
+## DP: copyright statements.
+
[EMAIL PROTECTED]@
+diff -urN libpri-1.4.1.orig/libpri.h libpri-1.4.1/libpri.h
+--- libpri-1.4.1.orig/libpri.h 2006-04-27 18:09:11.000000000 +0200
++++ libpri-1.4.1/libpri.h      2007-07-11 14:25:15.000000000 +0200
+@@ -5,6 +5,8 @@
+  *
+  * Copyright (C) 2001, Linux Support Services, Inc.
+  * All Rights Reserved.
++ * Copyright (C) 2003-2006 Junghanns.NET GmbH
++ * Klaus-Peter Junghanns <[EMAIL PROTECTED]>
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+@@ -26,8 +28,12 @@
+ #define _LIBPRI_H
+ 
+ /* Node types */
+-#define PRI_NETWORK           1
++#define PRI_NETWORK           1       /* PTP modes, default for PRI */
+ #define PRI_CPE                       2
++#define BRI_NETWORK_PTMP      3       /* PTMP modes, default for BRI */
++#define BRI_CPE_PTMP          4       
++#define BRI_NETWORK           5       /* PTP modes */
++#define BRI_CPE                       6       
+ 
+ /* Debugging */
+ #define PRI_DEBUG_Q921_RAW            (1 << 0)        /* Show raw HDLC frames 
*/
+@@ -76,6 +82,12 @@
+ #define PRI_EVENT_NOTIFY              16      /* Notification received */
+ #define PRI_EVENT_PROGRESS            17      /* When we get CALL_PROCEEDING 
or PROGRESS */
+ #define PRI_EVENT_KEYPAD_DIGIT                18      /* When we receive 
during ACTIVE state */
++#define PRI_EVENT_HOLD_REQ    19      /* R */
++#define PRI_EVENT_RETRIEVE_REQ  20
++#define PRI_EVENT_SUSPEND_REQ   21    /* park */
++#define PRI_EVENT_RESUME_REQ    22    /* unpark */
++#define PRI_EVENT_DISPLAY_RECEIVED    23
++#define PRI_EVENT_FACILITY    24      /* Facility */
+ 
+ /* Simple states */
+ #define PRI_STATE_DOWN                0
+@@ -252,11 +264,17 @@
+ #define PRI_NSF_ATT_MULTIQUEST         0xF0
+ #define PRI_NSF_CALL_REDIRECTION_SERVICE       0xF7
+ 
++#ifdef RELAX_TRB
++#define PRI_RELAX_TRB
++#endif
++
++typedef struct q921_call q921_call;
+ typedef struct q931_call q931_call;
+ 
+ typedef struct pri_event_generic {
+       /* Events with no additional information fall in this category */
+       int e;
++      int tei;
+ } pri_event_generic;
+ 
+ typedef struct pri_event_error {
+@@ -275,18 +293,19 @@
+       int cref;
+       int progress;
+       int progressmask;
+-      q931_call *call;
+       char useruserinfo[260];         /* User->User info */
++      q931_call *call;
+ } pri_event_ringing;
+ 
+ typedef struct pri_event_answer {
+       int e;
+       int channel;
++      int tei;                                /* belongs to this tei */
+       int cref;
+       int progress;
+       int progressmask;
+-      q931_call *call;
+       char useruserinfo[260];         /* User->User info */
++      q931_call *call;
+ } pri_event_answer;
+ 
+ typedef struct pri_event_facname {
+@@ -304,32 +323,37 @@
+       int e;
+       int channel;                            /* Channel requested */
+       int callingpres;                        /* Presentation of Calling 
CallerID */
+-      int callingplanani;                     /* Dialing plan of Calling 
entity ANI */
++      int callingpresuser;                    /* Presentation of Calling 
CallerID */
+       int callingplan;                        /* Dialing plan of Calling 
entity */
+-      char callingani[256];           /* Calling ANI */
+-      char callingnum[256];           /* Calling number */
++      int callingplanuser;                    /* Dialing plan of Calling 
entity */
++      int callingplanani;                     /* Dialing plan of Calling 
entity ANI */
++      char callingnum[256];           /* Calling number, network provided */
++      char callingani[256];           /* Calling number, user provided */
+       char callingname[256];          /* Calling name (if provided) */
+       int calledplan;                         /* Dialing plan of Called 
number */
+       int ani2;                   /* ANI II */
+       char callednum[256];            /* Called number */
+-      char redirectingnum[256];       /* Redirecting number */
+-      char redirectingname[256];      /* Redirecting name */
+-      int redirectingreason;          /* Reason for redirect */
++      char redirectingnum[256];               /* Redirecting number */
++      char redirectingname[256];              /* Redirecting name */
++      int redirectingreason;                  /* Reason for redirect */
+       int callingplanrdnis;                   /* Dialing plan of Redirecting 
Number */
+-      char useruserinfo[260];         /* User->User info */
++      char useruserinfo[260];                 /* User->User info */
+       int flexible;                           /* Are we flexible with our 
channel selection? */
+       int cref;                                       /* Call Reference 
Number */
+       int ctype;                                      /* Call type (see 
PRI_TRANS_CAP_* */
+-      int layer1;                                     /* User layer 1 */
++      int layer1;                             /* User layer 1 */
+       int complete;                           /* Have we seen "Complete" i.e. 
no more number? */
+       q931_call *call;                        /* Opaque call pointer */
+-      char callingsubaddr[256];       /* Calling parties subaddress */
++      int tei;                                /* belongs to this tei */
++      char callingsubaddr[256];               /* Calling parties subaddress */
+       int progress;
+       int progressmask;
+       char origcalledname[256];
+       char origcallednum[256];
+       int callingplanorigcalled;              /* Dialing plan of Originally 
Called Number */
+       int origredirectingreason;
++      char lowlayercompat[16];
++      char highlayercompat[4];
+ } pri_event_ring;
+ 
+ typedef struct pri_event_hangup {
+@@ -337,6 +361,8 @@
+       int channel;                            /* Channel requested */
+       int cause;
+       int cref;
++      int tei;
++      int inband_progress;
+       q931_call *call;                        /* Opaque call pointer */
+       long aoc_units;                         /* Advise of Charge number of 
charged units */
+       char useruserinfo[260];         /* User->User info */
+@@ -377,20 +403,80 @@
+       char digits[64];
+ } pri_event_keypad_digit;
+ 
++typedef struct pri_event_hold_req {
++      int e;
++      int channel;
++      int cref;
++      int tei;
++      q931_call *call;
++} pri_event_hold_req;
++
++/* euroisdn faciltiy fun */
++typedef struct pri_event_facility_req {
++      int e;
++      int channel;
++      int cref;
++      int tei;
++      int operation;
++      char forwardnum[256];           /* Redirection destination */
++      q931_call *call;
++} pri_event_facility_req;
++
++typedef struct pri_event_retrieve_req {
++      int e;
++      int channel;
++      int cref;
++      int tei;
++      q931_call *call;
++} pri_event_retrieve_req;
++
++typedef struct pri_event_suspend_req {
++      int e;
++      int channel;
++      int cref;
++      int tei;
++      q931_call *call;
++      char callid[10];
++} pri_event_suspend_req;
++
++typedef struct pri_event_resume_req {
++      int e;
++      int channel;
++      int cref;
++      int tei;
++      q931_call *call;
++      char callid[10];
++} pri_event_resume_req;
++
++typedef struct pri_event_display {
++      int e;
++      int channel;            
++      int cref;                       
++      q931_call *call;
++      char text[256];
++} pri_event_display;
++
++
+ typedef union {
+       int e;
+       pri_event_generic gen;          /* Generic view */
+       pri_event_restart restart;      /* Restart view */
+       pri_event_error   err;          /* Error view */
+       pri_event_facname facname;      /* Caller*ID Name on Facility */
++      pri_event_facility_req facility;        /* sservices */
+       pri_event_ring    ring;         /* Ring */
+       pri_event_hangup  hangup;       /* Hang up */
+       pri_event_ringing ringing;      /* Ringing */
+       pri_event_answer  answer;       /* Answer */
+       pri_event_restart_ack restartack;       /* Restart Acknowledge */
+       pri_event_proceeding  proceeding;       /* Call proceeding & Progress */
+       pri_event_setup_ack   setup_ack;        /* SETUP_ACKNOWLEDGE structure 
*/
+       pri_event_notify notify;                /* Notification */
++      pri_event_hold_req hold_req;
++      pri_event_retrieve_req retrieve_req;
++      pri_event_suspend_req suspend_req;
++      pri_event_resume_req resume_req;
++      pri_event_display display;
+       pri_event_keypad_digit digit;                   /* Digits that come 
during a call */
+ } pri_event;
+ 
+@@ -405,7 +491,9 @@
+    channel operating in HDLC mode with FCS computed by the fd's driver.  Also 
it
+    must be NON-BLOCKING! Frames received on the fd should include FCS.  
Nodetype 
+    must be one of PRI_NETWORK or PRI_CPE.  switchtype should be PRI_SWITCH_* 
*/
+-extern struct pri *pri_new(int fd, int nodetype, int switchtype);
++extern struct pri *pri_new(int fd, int nodetype, int switchtype, int span);
++
++extern void pri_shutdown(struct pri *pri);
+ 
+ /* Create D-channel just as above with user defined I/O callbacks and data */
+ extern struct pri *pri_new_cb(int fd, int nodetype, int switchtype, pri_io_cb 
io_read, pri_io_cb io_write, void *userdata);
+@@ -429,6 +517,9 @@
+ /* Enable transmission support of Facility IEs on the pri */
+ extern void pri_facility_enable(struct pri *pri);
+ 
++/* Set file descriptor for debugging to a file */
++extern void pri_set_debug_fd(struct pri *pri, int fd);
++
+ /* Run PRI on the given D-channel, taking care of any events that
+    need to be handled.  If block is set, it will block until an event
+    occurs which needs to be handled */
+@@ -469,6 +560,12 @@
+ /* Send a keypad facility string of digits */
+ extern int pri_keypad_facility(struct pri *pri, q931_call *call, char 
*digits);
+ 
++/* Send a INFO msg with display ie  */
++extern int pri_information_display(struct pri *pri, q931_call *call, char 
*display);
++
++/* add a display ie to a call, so it can be sent with the next message */
++extern int pri_add_display(struct pri *pri, q931_call *call, char *display);
++
+ /* Answer the incomplete(call without called number) call on the given 
channel.
+    Set non-isdn to non-zero if you are not connecting to ISDN equipment */
+ extern int pri_need_more_info(struct pri *pri, q931_call *call, int channel, 
int nonisdn);
+@@ -477,6 +574,35 @@
+    Set non-isdn to non-zero if you are not connecting to ISDN equipment */
+ extern int pri_answer(struct pri *pri, q931_call *call, int channel, int 
nonisdn);
+ 
++extern int pri_deflect(struct pri *pri, q931_call *call, char *destination);
++
++/* Ack a HOLD_REQ */
++extern int pri_hold_acknowledge(struct pri *pri, q931_call *call);
++
++/* Reject a HOLD_REQ */
++extern int pri_hold_reject(struct pri *pri, q931_call *call);
++
++/* Ack a RETRIEVE_REQ */
++extern int pri_retrieve_acknowledge(struct pri *pri, q931_call *call, int 
channel);
++
++/* Reject a RETRIEVE_REQ */
++extern int pri_retrieve_reject(struct pri *pri, q931_call *call);
++
++/* Ack a SUSPEND_REQ */
++extern int pri_suspend_acknowledge(struct pri *pri, q931_call *call, char 
*display);
++
++/* Reject a SUSPEND_REQ */
++extern int pri_suspend_reject(struct pri *pri, q931_call *call, char 
*display);
++
++/* Reject a RESUME_REQ */
++extern int pri_resume_reject(struct pri *pri, q931_call *call, char *display);
++
++/* Ack a RESUME_REQ */
++extern int pri_resume_acknowledge(struct pri *pri, q931_call *call, int 
channel, char *display);
++
++/* Send a Facility Message */
++extern int pri_facility(struct pri *pri, q931_call *call, int operation, char 
*arguments);
++
+ /* Set CRV reference for GR-303 calls */
+ 
+ 
+@@ -485,14 +611,14 @@
+ 
+ /* backwards compatibility for those who don't use asterisk with libpri */
+ #define pri_release(a,b,c) \
+-      pri_hangup(a,b,c)
++      pri_hangup(a,b,c, -1)
+ 
+ #define pri_disconnect(a,b,c) \
+-      pri_hangup(a,b,c)
++      pri_hangup(a,b,c, -1)
+ 
+ /* Hangup a call */
+ #define PRI_HANGUP
+-extern int pri_hangup(struct pri *pri, q931_call *call, int cause);
++extern int pri_hangup(struct pri *pri, q931_call *call, int cause, int 
aocunits);
+ 
+ #define PRI_DESTROYCALL
+ extern void pri_destroycall(struct pri *pri, q931_call *call);
+@@ -525,7 +651,7 @@
+ extern void pri_sr_free(struct pri_sr *sr);
+ 
+ extern int pri_sr_set_channel(struct pri_sr *sr, int channel, int exclusive, 
int nonisdn);
+-extern int pri_sr_set_bearer(struct pri_sr *sr, int transmode, int userl1);
++extern int pri_sr_set_bearer(struct pri_sr *sr, int transmode, int userl1, 
char *llc);
+ extern int pri_sr_set_called(struct pri_sr *sr, char *called, int calledplan, 
int complete);
+ extern int pri_sr_set_caller(struct pri_sr *sr, char *caller, char 
*callername, int callerplan, int callerpres);
+ extern int pri_sr_set_redirecting(struct pri_sr *sr, char *num, int plan, int 
pres, int reason);
+@@ -553,8 +679,8 @@
+ 
+ /* Override message and error stuff */
+ #define PRI_NEW_SET_API
+-extern void pri_set_message(void (*__pri_error)(struct pri *pri, char *));
+-extern void pri_set_error(void (*__pri_error)(struct pri *pri, char *));
++extern void pri_set_message(void (*__pri_error)(char *, int span));
++extern void pri_set_error(void (*__pri_error)(char *, int span));
+ 
+ /* Set overlap mode */
+ #define PRI_SET_OVERLAPDIAL
+diff -urN libpri-1.4.1.orig/Makefile libpri-1.4.1/Makefile
+--- libpri-1.4.1.orig/Makefile 2006-12-30 20:17:34.000000000 +0100
++++ libpri-1.4.1/Makefile      2007-07-11 14:25:15.000000000 +0200
+@@ -27,6 +27,16 @@
+ # Uncomment if you want libpri to count number of Q921/Q931 sent/received
+ #LIBPRI_COUNTERS=-DLIBPRI_COUNTERS
+ 
++# Uncomment if you want libpri to always keep layer 2 up
++#LAYER2ALWAYSUP=-DLAYER2ALWAYSUP
++
++# Uncomment if you want libpri to hangup a call to an NT (p2mp) port if one
++# device sends a RELEASE COMPLETE with cause 17
++#FASTBUSYONBUSY=-DFASTBUSYONBUSY
++
++# workaround for slowly responding COs
++#RELAXEDTIMERS=-DRELAXED_TIMERS
++
+ CC=gcc
+ 
+ OSARCH=$(shell uname -s)
+@@ -36,7 +46,7 @@
+ DYNAMIC_LIBRARY=libpri.so.1.0
+ STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
+ DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
+-CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC 
$(ALERTING) $(LIBPRI_COUNTERS)
++CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC 
$(ALERTING) $(LIBPRI_COUNTERS) $(LAYER2ALWAYSUP) $(FASTBUSYONBUSY) -DRELAX_TRB 
$(RELAXEDTIMERS)
+ INSTALL_PREFIX=$(DESTDIR)
+ INSTALL_BASE=/usr
+ SOFLAGS = -Wl,-hlibpri.so.1.0
+diff -urN libpri-1.4.1.orig/pri.c libpri-1.4.1/pri.c
+--- libpri-1.4.1.orig/pri.c    2006-07-06 23:11:37.000000000 +0200
++++ libpri-1.4.1/pri.c 2007-07-11 14:25:15.000000000 +0200
+@@ -1,24 +1,14 @@
+ /*
+  * libpri: An implementation of Primary Rate ISDN
+  *
+- * Written by Mark Spencer <[EMAIL PROTECTED]>
++ * Written by Mark Spencer <[EMAIL PROTECTED]>
+  *
+- * Copyright (C) 2001-2005, Digium
+- * All Rights Reserved.
++ * This program is confidential ( <- I dont think so! )
+  *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
+- * (at your option) any later version.
+- * 
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+- * GNU General Public License for more details.
+- * 
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
++ * Copyright (C) 2001, Linux Support Services, Inc.
++ * All Rights Reserved.
++ * Copyright (C) 2003-2006 Junghanns.NET GmbH
++ * Klaus-Peter Junghanns <[EMAIL PROTECTED]>
+  *
+  */
+ 
+@@ -48,6 +38,14 @@
+               return "Network";
+       case PRI_CPE:
+               return "CPE";
++      case BRI_NETWORK:
++              return "Network";
++      case BRI_CPE:
++              return "CPE";
++      case BRI_NETWORK_PTMP:
++              return "Network (PtMP)";
++      case BRI_CPE_PTMP:
++              return "CPE (PtMP)";
+       default:
+               return "Invalid value";
+       }
+@@ -187,7 +185,7 @@
+       return res;
+ }
+ 
+-static struct pri *__pri_new(int fd, int node, int switchtype, struct pri 
*master, pri_io_cb rd, pri_io_cb wr, void *userdata)
++static struct pri *__pri_new(int fd, int node, int switchtype, struct pri 
*master, pri_io_cb rd, pri_io_cb wr, void *userdata, int span)
+ {
+       struct pri *p;
+       p = malloc(sizeof(struct pri));
+@@ -207,6 +205,8 @@
+               p->master = master;
+               p->callpool = &p->localpool;
+               pri_default_timers(p, switchtype);
++              p->debugfd = -1;
++              p->span = span;
+ #ifdef LIBPRI_COUNTERS
+               p->q921_rxcount = 0;
+               p->q921_txcount = 0;
+@@ -217,7 +217,7 @@
+                       p->protodisc = GR303_PROTOCOL_DISCRIMINATOR;
+                       p->sapi = Q921_SAPI_GR303_EOC;
+                       p->tei = Q921_TEI_GR303_EOC_OPS;
+-                      p->subchannel = __pri_new(-1, node, 
PRI_SWITCH_GR303_EOC_PATH, p, NULL, NULL, NULL);
++                      p->subchannel = __pri_new(-1, node, 
PRI_SWITCH_GR303_EOC_PATH, p, NULL, NULL, NULL, span);
+                       if (!p->subchannel) {
+                               free(p);
+                               p = NULL;
+@@ -226,7 +226,7 @@
+                       p->protodisc = GR303_PROTOCOL_DISCRIMINATOR;
+                       p->sapi = Q921_SAPI_GR303_TMC_CALLPROC;
+                       p->tei = Q921_TEI_GR303_TMC_CALLPROC;
+-                      p->subchannel = __pri_new(-1, node, 
PRI_SWITCH_GR303_TMC_SWITCHING, p, NULL, NULL, NULL);
++                      p->subchannel = __pri_new(-1, node, 
PRI_SWITCH_GR303_TMC_SWITCHING, p, NULL, NULL, NULL, span);
+                       if (!p->subchannel) {
+                               free(p);
+                               p = NULL;
+@@ -242,7 +242,7 @@
+               }
+               /* Start Q.921 layer, Wait if we're the network */
+               if (p)
+-                      q921_start(p, p->localtype == PRI_CPE);
++                      q921_start(p, p->localtype == PRI_CPE, 0);
+       }
+       return p;
+ }
+@@ -262,15 +262,16 @@
+ {
+       /* Restart Q.921 layer */
+       if (pri) {
+-              q921_reset(pri);
+-              q921_start(pri, pri->localtype == PRI_CPE);     
++// XXX                q921_reset(pri);
++//            q921_start(pri, pri->localtype == PRI_CPE);     
+       }
+       return 0;
+ }
+ 
+-struct pri *pri_new(int fd, int nodetype, int switchtype)
++
++struct pri *pri_new(int fd, int nodetype, int switchtype, int span)
+ {
+-      return __pri_new(fd, nodetype, switchtype, NULL, __pri_read, 
__pri_write, NULL);
++      return __pri_new(fd, nodetype, switchtype, NULL, __pri_read, 
__pri_write, NULL, span);
+ }
+ 
<<Diff was trimmed, longer than 597 lines>>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to