Merge branch 'master' into smgmaster
Conflicts: build/modules.conf.in
This commit is contained in:
commit
2a9046fdb8
|
@ -1,3 +1,3 @@
|
|||
en-us-callie 1.0.16
|
||||
ru-RU-elena 1.0.12
|
||||
ru-RU-elena 1.0.13
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<!-- <load module="mod_unicall"/> -->
|
||||
<!-- <load module="mod_skinny"/> -->
|
||||
<!-- <load module="mod_khomp"/> -->
|
||||
<!-- <load module="mod_rtmp"/> -->
|
||||
|
||||
<!-- Applications -->
|
||||
<load module="mod_commands"/>
|
||||
|
|
|
@ -32,4 +32,187 @@
|
|||
<param name="sample-rate" value="48000"/>
|
||||
<param name="codec-ms" value="20"/>
|
||||
</settings>
|
||||
|
||||
<!--
|
||||
mod_portaudio "streams"
|
||||
|
||||
The portaudio streams were introduced to support multiple devices and multiple channels in mod_portaudio.
|
||||
For example, if you have a sound card that supports multiple channels or have multiple sound cards and you
|
||||
want to use them at the same time, you can do it configuring streams and endpoints here.
|
||||
|
||||
A "stream" is just a logical container for some settings required by portaudio in order to stream audio and
|
||||
define a friendly name for that configuration. Streams in itself do not do anything else than contain configs.
|
||||
Once you have your streams defined you can proceed to define "endpoints". Go to the "<endpoints>" section
|
||||
for more information on endpoints.
|
||||
|
||||
You can use the command "pa shstreams" (portaudio shared streams) to show the configured streams.
|
||||
-->
|
||||
<streams>
|
||||
<!--
|
||||
In this example we define 2 streams, one for a usb audio device and another for the usual Mac defaults
|
||||
The name="" attribute in the <stream> tag must uniquely identify the stream configuration and can be
|
||||
later used when creating endpoints in the "instream" and "outstream" parameters of the endpoint.
|
||||
-->
|
||||
|
||||
<!-- This sample "usb1" configuration was tested with a USB Griffin iMic device -->
|
||||
<stream name="usb1">
|
||||
<!--
|
||||
Which device to use for input in this stream
|
||||
The value for this parameter must be either in the form '#devno',
|
||||
for example '#2' for device number 2, or 'device-name', like 'iMic USB audio system'
|
||||
The output of command "pa devlist" will show you device names and numbers as enumerated
|
||||
by portaudio.
|
||||
-->
|
||||
<param name="indev" value="#2" />
|
||||
|
||||
<!--
|
||||
Same as the indev but for output. In this case the device is capable of input and output
|
||||
Some devices are capable of input only or output only (see the default example)
|
||||
-->
|
||||
<param name="outdev" value="#2" />
|
||||
|
||||
<!-- The sample rate to use for this stream -->
|
||||
<param name="sample-rate" value="48000" />
|
||||
|
||||
<!--
|
||||
Size of the packets in milliseconds. The smaller the number the less latency you'll have
|
||||
The minimum value is 10ms
|
||||
-->
|
||||
<param name="codec-ms" value="10" />
|
||||
|
||||
<!--
|
||||
How many channels to open for this stream.
|
||||
If you're device is stereo, you can choose 2 here. However, bear in mind that then
|
||||
your left and right channels will be separated and when creating endpoints you will have
|
||||
to either choose the left or right channel. This may or may not be what you want. This separation
|
||||
means that you can have 2 separate FreeSWITCH calls, listening to one of them in your left channel
|
||||
and the other in the right chanel.
|
||||
-->
|
||||
<param name="channels" value="2" />
|
||||
</stream>
|
||||
|
||||
<!-- This default stream was tested using the default Macbook Pro input/output devices -->
|
||||
<stream name="default">
|
||||
<!-- The default system input device -->
|
||||
<param name="indev" value="#0" />
|
||||
<!-- The default system output device -->
|
||||
<param name="outdev" value="#1" />
|
||||
<!-- CD quality sampling rate ftw -->
|
||||
<param name="sample-rate" value="48000" />
|
||||
<!-- Low latency -->
|
||||
<param name="codec-ms" value="10" />
|
||||
<!-- Choosing 1 channel allows to hear in both left-right channel when using a headset -->
|
||||
<param name="channels" value="1" />
|
||||
</stream>
|
||||
</streams>
|
||||
|
||||
<!--
|
||||
mod_portaudio "endpoints"
|
||||
|
||||
Endpoints is a way to define the input and output that a given portaudio channel will use.
|
||||
There is a lot of flexibility. You can create endpoints which are "send-only", which means
|
||||
audio will be read from FreeSWITCH and sent down to the provided stream, but no audio will
|
||||
be read from that stream and only silence provided back to FreeSWITCH.
|
||||
|
||||
send-only endpoint:
|
||||
(FS CORE) ->-> audio ->-> sound-card-x
|
||||
|
||||
You can also create a read-only endpoint.
|
||||
|
||||
read-only-endpoint:
|
||||
(FS CORE) <-<- audio <-<- sound-card-x
|
||||
|
||||
And of course you can create a bidirectional endpoint:
|
||||
bidirectional-endpoint:
|
||||
(FS CORE) <-> audio <-> sound-card-x
|
||||
|
||||
You can also define a stream which uses only the left or only the right channel of a given device stream.
|
||||
This means you can have 2 SIP calls connected to the same device haring one call in your left ear and
|
||||
the other call to your right ear :-)
|
||||
|
||||
The name="parameter" of the endpoint allows you to use it in the FreeSWITCH dial plan to dial, ie:
|
||||
|
||||
<action application="bridge" data="portaudio/endpoint/usb1out-left" />
|
||||
|
||||
You can use the command "pa endpoints" to show the configured endpoints.
|
||||
-->
|
||||
<endpoints>
|
||||
|
||||
<!--
|
||||
An endpoint is a handle name to refer to a configuration that determines where to read media from
|
||||
and write media to. The endpoint can use any input/output stream combination for that purpose as
|
||||
long as the streams match the sampling rate and codec-ms (see <streams> XML tag).
|
||||
You can also omit the instream or the outstream parameter (but obviously not both).
|
||||
-->
|
||||
|
||||
<!--
|
||||
Configuration for a "default" bidirectional endpoint that uses the default stream defined previously in
|
||||
the <streams> section.
|
||||
-->
|
||||
<endpoint name="default">
|
||||
<!--
|
||||
The instream, outstream is the name of the stream and channel to use. The stream
|
||||
name is the same you configured in the <streams> section. This parameters follow
|
||||
the syntax <stream-name>:<channel index>. You can omit either the outstream
|
||||
or the instream, but not both! The channel index is zero-based and must be consistent
|
||||
with the number of channels available for that stream (as configured in the <stream> section).
|
||||
You cannot use index 1 if you chose channels=1 in the stream configuration.
|
||||
-->
|
||||
<param name="instream" value="default:0" />
|
||||
<param name="outstream" value="default:0" />
|
||||
</endpoint>
|
||||
|
||||
<!--
|
||||
This endpoint uses the USB stream defined previously in the <streams> section and
|
||||
is 'send-only' or 'output-only' and uses the channel index 0 (left channel in a stereo device)
|
||||
-->
|
||||
<endpoint name="usb1out-left">
|
||||
<param name="outstream" value="usb1:0" />
|
||||
</endpoint>
|
||||
|
||||
<!--
|
||||
This endpoint uses the USB stream defined previously in the <streams> section and
|
||||
is 'send-only' or 'output-only' and uses the channel index 1 (right channel in a stereo device)
|
||||
-->
|
||||
<endpoint name="usb1out-right">
|
||||
<param name="outstream" value="usb1:1" />
|
||||
</endpoint>
|
||||
|
||||
<!--
|
||||
This endpoint uses the USB stream defined previously in the <streams> section and
|
||||
is 'receive-only' or 'input-only' and uses the channel index 0 (left channel in a stereo device)
|
||||
-->
|
||||
<endpoint name="usb1in-left">
|
||||
<param name="instream" value="usb1:0" />
|
||||
</endpoint>
|
||||
|
||||
<!--
|
||||
This endpoint uses the USB stream defined previously in the <streams> section and
|
||||
is 'receive-only' or 'input-only' and uses the channel index 1 (right channel in a stereo device)
|
||||
-->
|
||||
<endpoint name="usb1in-right">
|
||||
<param name="instream" value="usb1:1" />
|
||||
</endpoint>
|
||||
|
||||
<!--
|
||||
This endpoint uses the USB stream defined previously in the <streams> section and
|
||||
is 'bidirectional' or 'send-receive' and uses the channel index 0 (left channel in a stereo device)
|
||||
-->
|
||||
<endpoint name="usb1-left">
|
||||
<param name="instream" value="usb1:0" />
|
||||
<param name="outstream" value="usb1:0" />
|
||||
</endpoint>
|
||||
|
||||
<!--
|
||||
This endpoint uses the USB stream defined previously in the <streams> section and
|
||||
is 'bidirectional' or 'send-receive' and uses the channel index 1 (right channel in a stereo device)
|
||||
-->
|
||||
<endpoint name="usb1-right">
|
||||
<param name="instream" value="usb1:1" />
|
||||
<param name="outstream" value="usb1:1" />
|
||||
</endpoint>
|
||||
|
||||
</endpoints>
|
||||
|
||||
</configuration>
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<configuration name="rtmp.conf" description="RTMP Endpoint">
|
||||
<profiles>
|
||||
<profile name="default">
|
||||
<settings>
|
||||
<param name="bind-address" value="0.0.0.0:1935" />
|
||||
<param name="context" value="public" />
|
||||
<param name="dialplan" value="XML" />
|
||||
<!-- If this is set to true, no unauthenticated inbound calls will be allowed -->
|
||||
<param name="auth-calls" value="true" />
|
||||
<!-- How much time should the clients buffer the media stream (miliseconds) -->
|
||||
<param name="buffer-len" value="50" />
|
||||
<!-- Sets the maximum size of outbound RTMP chunks -->
|
||||
<param name="chunksize" value="512" />
|
||||
</settings>
|
||||
</profile>
|
||||
</profiles>
|
||||
</configuration>
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
<param name="max-connection-count" value="100"/>
|
||||
<param name="offer-new-connection" value="1"/>
|
||||
<param name="request-timeout" value="3000"/>
|
||||
</settings>
|
||||
|
||||
<profiles>
|
||||
|
|
|
@ -274,7 +274,15 @@
|
|||
|
||||
<extension name="Local_Extension_Skinny">
|
||||
<condition field="destination_number" expression="^(11[01][0-9])$">
|
||||
<action application="set" data="dialed_extension=$1"/>
|
||||
<action application="export" data="dialed_extension=$1"/>
|
||||
<action application="set" data="call_timeout=30"/>
|
||||
<action application="set" data="hangup_after_bridge=true"/>
|
||||
<action application="set" data="continue_on_fail=true"/>
|
||||
<action application="bridge" data="skinny/internal/${destination_number}"/>
|
||||
<action application="answer"/>
|
||||
<action application="sleep" data="1000"/>
|
||||
<action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
This context is used for skinny to match dialed number
|
||||
|
||||
The special applications:
|
||||
- skinny-route tells skinny to route the call
|
||||
- skinny-process tells skinny to process the call (route, set call forwarding, ...)
|
||||
- skinny-drop tells skinny to drop the call
|
||||
- skinny-wait tells skinny to wait 'data' seconds for more numbers before drop
|
||||
-->
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<include>
|
||||
<extension name="Demo">
|
||||
<condition field="destination_number" expression="^(9[0-9]{3})$">
|
||||
<action application="skinny-route"/>
|
||||
<action application="skinny-process"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</include>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<include>
|
||||
<extension name="Local_Extension">
|
||||
<condition field="destination_number" expression="^(10[01][0-9])$">
|
||||
<action application="skinny-route"/>
|
||||
<action application="skinny-process"/>
|
||||
</condition>
|
||||
</extension>
|
||||
<extension name="Local_Extension_Skinny">
|
||||
<condition field="destination_number" expression="^(11[01][0-9])$">
|
||||
<action application="skinny-route"/>
|
||||
<action application="skinny-process"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</include>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<include>
|
||||
<extension name="External">
|
||||
<condition field="destination_number" expression="^(0[0-9]{10,})$">
|
||||
<action application="skinny-route"/>
|
||||
<action application="skinny-process"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</include>
|
||||
|
|
|
@ -94,16 +94,16 @@
|
|||
<input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
|
||||
<match>
|
||||
<action function="play-file" data="directory/dir-to_select_entry.wav"/>
|
||||
<action function="play-file" data="directory/dir-press.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="directory/dir-for_next.wav"/>
|
||||
<action function="play-file" data="directory/dir-press.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="directory/dir-for_prev.wav"/>
|
||||
<action function="play-file" data="directory/dir-press.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
|
||||
<action function="play-file" data="directory/dir-start_new_search.wav"/>
|
||||
<action function="play-file" data="directory/dir-press.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
|
||||
|
||||
</match>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<!--voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. -->
|
||||
<X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/> <!-- vm/tts.xml if you want to use tts and have cepstral -->
|
||||
<X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
|
||||
<X-PRE-PROCESS cmd="include" data="ivr/*.xml"/> <!-- IVR and custom phrases go here -->
|
||||
</macros>
|
||||
</phrases>
|
||||
</language>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
freeswitch (1.0.head-git.master.20110530.1-1) unstable; urgency=low
|
||||
|
||||
* added mod_cdr_sqlite
|
||||
|
||||
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Mon, 30 May 2011 16:02:02 +0200
|
||||
|
||||
freeswitch (1.0.head-git.master.20110402.1-1) unstable; urgency=low
|
||||
|
||||
* Added Hebrew lang package
|
||||
|
|
|
@ -155,6 +155,7 @@ opt/freeswitch/mod/mod_skinny.so*
|
|||
opt/freeswitch/mod/mod_skypopen.so*
|
||||
opt/freeswitch/mod/mod_sndfile.so*
|
||||
opt/freeswitch/mod/mod_snom.so*
|
||||
opt/freeswitch/mod/mod_cdr_sqlite.so*
|
||||
opt/freeswitch/mod/mod_sofia.so*
|
||||
opt/freeswitch/mod/mod_spandsp.so*
|
||||
opt/freeswitch/mod/mod_speex.so*
|
||||
|
|
|
@ -23,7 +23,7 @@ export CODECS_MODULES= codecs/mod_bv codecs/mod_h26x codecs/mod_speex codecs/mod
|
|||
export DIALPLANS_MODULES= dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml
|
||||
export ENDPOINTS_MODULES= endpoints/mod_dingaling endpoints/mod_portaudio endpoints/mod_sofia endpoints/mod_loopback \
|
||||
../../libs/freetdm/mod_freetdm endpoints/mod_skypopen endpoints/mod_skinny
|
||||
export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv
|
||||
export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv event_handlers/mod_cdr_sqlite
|
||||
export FORMATS_MODULES= formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
|
||||
formats/mod_shout formats/mod_sndfile formats/mod_tone_stream
|
||||
export LANGUAGES_MODULES=languages/mod_spidermonkey languages/mod_perl languages/mod_lua languages/mod_python
|
||||
|
|
|
@ -43,6 +43,10 @@ freeswitch (1.0.7)
|
|||
config: add default to conf to demonstrate min-idle-cpu (r:b8b7266a)
|
||||
config: change min/max enforcements to >= instead of > (r:0d5fcf65)
|
||||
config: Add README_IMPORTANT.txt to default configuration (r:6cd5ce72)
|
||||
config: Talking clock dialplan example (Thanks AviMarcus) (r:ffb4a3ae)
|
||||
config: fix talking clock regexes (need ^ and $ so they don't match only 917x) (r:8529ba33)
|
||||
config: Update phrase_en.xml to reflect 1.0.16 sounds version (r:7499dfb2)
|
||||
config: bump en sounds version to 1.0.16 (r:50ce2cae)
|
||||
core: Add RTCP support (FSRTP-14)
|
||||
core: handle some errors on missing db handle conditions
|
||||
core: add ... and shutdown as a fail-safe when no modules are loaded
|
||||
|
@ -245,6 +249,18 @@ freeswitch (1.0.7)
|
|||
core: enable optimal defaults on linux kernels that can support newer features. (r:0b51aca3)
|
||||
core: Lower NAT port mapping disabled log msg from WARNING to INFO (r:973a850d)
|
||||
core: Change the structure of the phrases/language system. Previously it was fxml->phrases->macros->language->macro. Changed it so fxml->languages->language->phrases->macros->macro You can have sub macros <macros name="voicemail"><macro ...> and allow you to call it login@voicemail. Change the sound-path to sound-prefix to make it constistant with the rest of freeswitch. Also allow to set a sound-prefix to a macros, so you can override it for a specific file set. You can set say-modules="en" or whatever in the <language section to define that say module to use. (r:4137b360)
|
||||
core: Fix edge case segfault on fifo member answer call (r:bf107c6f/FS-3269)
|
||||
core: Fix intercept application (r:f8835a81/FS-3271)
|
||||
core: add bridged timestamp and hangup_complete_with_xml=true to add xml_cdr to the body of hangup_complete events (r:bd471fc6)
|
||||
core: Modify freeswitch to use a configurable switchname instead of a hostname (r:00b53a91/FS-3277)
|
||||
core: add option to disable srtp with --disable-srtp (r:a6b336e4)
|
||||
core: record_session: Will auto create recursive destination folder if it doesn't already exist (Doesn't create folder when used with local cache feature) (r:c4b78a49)
|
||||
core: add largest_jb_size (r:1772fcb0)
|
||||
core: improve curl + openssl threading (r:7064487d/FS-2936)
|
||||
core: reset offset_pos on seek to 0 (r:e375d1d2)
|
||||
core: fix edge case between fail_on_single_reject and group_confirm (r:fae95433/FS-3303)
|
||||
core: add prefix chars to playback_terminators + means include the term in the string and x means include the char and return SWITCH_STATUS_RESTART eg #+* only includes the * if you type it but not the # (r:38b3f43d)
|
||||
core: add additional format YYYYMMDDHHMMSS to strepoch (r:38f06a3b)
|
||||
embedded languages: Provide core level support for conditional Set Global Variable (r:c017c24b/FSCORE-612)
|
||||
embedded languages: add insertFile front end to switch_ivr_insert_file and reswig (r:c4e350ab)
|
||||
fs_cli: block control-z from fs cli and print a warning how to exit properly (r:dc436b82)
|
||||
|
@ -303,6 +319,7 @@ freeswitch (1.0.7)
|
|||
libsofiasip: set minimum initital sip t1 timer to 1000ms to work around race condition on retry timer firing before all the things that are supposed to be handled by the timer are set. The base resolution on this timer is 500ms, so doubling up makes sure we always hit the initial retry timer on the next run, where everything should be set. The side effect was, 1/2 the time on a request that did not get immediate response, the timer would be fired and cleared, but the action (sending retry) was never done, and a new timer was not set, causing the request to just sit zombied and never retry. A better solution would be to find and correct the race condition so the timer is never set to early and we never hit this condition. (r:20c2740c)
|
||||
libsofiasip: fix bad assert (r:56404641/FS-3133)
|
||||
libsofiasip: lower stack and boost priority of sofia schedule thread (r:257bc9ff)
|
||||
libsofiasip: Fix for issue reported on the mailing list with a Chinese locale and windows. This commit removes a hidden char that should not have been there anyway. (r:7adaceb8)
|
||||
libspandsp: Fixed a typo in spandsp's msvc/inttypes.h Updated sig_tone processing in spandsp to the latest, to allow moy to proceed with his signaling work.
|
||||
libspandsp: removed a saturate16 from spandsp that was causing problems fixed a typo in the MSVC inttypes.h file for spandsp
|
||||
libspandsp: Changes to the signaling tone detector to detect concurrent 2400Hz + 2600Hz tones. This passes voice immunity and other key tests, but it bounces a bit when transitions like 2400 -> 2400+2600 -> 2600 occur. Transitions between tone off and tone on are clean. (r:bc13e944)
|
||||
|
@ -310,8 +327,10 @@ freeswitch (1.0.7)
|
|||
libspandsp: Fix for T.30 processing of operator interrupts, to improve compatibility with some machines, which seem to send them when no operator is around. (r:84ee0ae6)
|
||||
libspandsp: spandsp t38 fax receiving error in win XP - regression from f029f7ef (r:761cec8f/FS-2766)
|
||||
libspandsp: Added missing error codes when an ECM FAX is abandoned with the T30_ERR message (r:ec57dc7a)
|
||||
libspandsp: Fixed a vulnerability in T.4 and T.6 processing which is similar to <a href="http://bugzilla.maptools.org/show_bug.cgi?id=2297">http://bugzilla.maptools.org/show_bug.cgi?id=2297</a> in libtiff. A really screwed up 2D T.4 image, or a maliciously constructed T.4 2D or T.6 image should potential run off the end of an image decoder buffer. (r:c6f67322)
|
||||
libspandsp: Fixed a vulnerability in T.4 and T.6 processing which is similar to http://bugzilla.maptools.org/show_bug.cgi?id=2297 in libtiff. A really screwed up 2D T.4 image, or a maliciously constructed T.4 2D or T.6 image should potential run off the end of an image decoder buffer. (r:c6f67322)
|
||||
libspandsp: Changed T.38 terminal handling, so errors from the user's packet transmit routine properly filter up the chain, cause termination of the FAX session, and are reported to the caller. (r:c890fbfa)
|
||||
libstfu: add param to jb to try to recapture latency (disabled by default) (r:d59d41d7)
|
||||
libsqlite: fix issue on mailing list mod_crd_sqlite entry limit and sqlite segfaults on triggers (r:1badec17)
|
||||
mod_avmd: Initial check in - Advanced Voicemail Detect (r:10c6a30a) (by Eric Des Courtis)
|
||||
mod_avmd: Add to windows build (r:df4bd935)
|
||||
mod_avmd: Fix mem leak (r:cd951384/FS-2839)
|
||||
|
@ -349,6 +368,8 @@ freeswitch (1.0.7)
|
|||
mod_callcenter: Reload a queue wont delete all the currently waiting members. Only a reload of the module will. (r:c5ae5de0/FS-3250)
|
||||
mod_callcenter: Add a very prototype (and maybe not functional) strategy called : sequentially-by-next-agent-order. It will try to find the last agent we tried to reach, and start calling more agent after that one based on position. It will use the level for the next agent, but once that level is done, it start back at the lowest level (r:bef6f0f4)
|
||||
mod_callcenter: New strategies: round-robin, random, and 'top-down' (r:2b4b23aa,r:bee247ca)
|
||||
mod_callcenter: Display an warning when MOH is invalid and resume wait with silence. (r:37b14c9a/FS-2740)
|
||||
mod_callcenter: Fix member been switch as abandoned when he was pickup by an agent (r:9ff8f53f/FS-3281)
|
||||
mod_cdr_sqlite: initial commit (r:f625fe3b)
|
||||
mod_cdr_sqlite: config file for mod_cdr_sqlite (r:25bc8fe3)
|
||||
mod_cdr_sqlite: Drop transaction BEGIN/END around INSERT. We're only executing one command, and autocommit will automatically rollback if the INSERT fails. Sync state_handlers with mod_cdr_csv. Minor libpq fixups. (r:0f95b870)
|
||||
|
@ -411,6 +432,9 @@ freeswitch (1.0.7)
|
|||
mod_conference: wait for channels to come up in paging mode (r:b8063c3d)
|
||||
mod_conference: Conference APIs for enabling/disabling enter/exit sounds for active conferences (r:31cebd4f/FS-3219)
|
||||
mod_conference: Fix pool swelling, replaced a pool strdup that could recur with a strdup/free to avoid it (r:bcd6c3a1/FS-3137)
|
||||
mod_conference: remove auto gain events (r:7ba849b3)
|
||||
mod_conference: add custom exit sound to match enter sound on conf (r:3d475876)
|
||||
mod_conference: don't play default when playing a custom one (r:c7b36157)
|
||||
mod_curl: use method=post when post requested (r:c6a4ddd0/FSMOD-69)
|
||||
mod_db: fix stack corruption (MODAPP-407)
|
||||
mod_dialplan_xml: Add in the INFO log the caller id number when processing a request (Currenly only show the caller name) (r:e1df5e13)
|
||||
|
@ -440,6 +464,8 @@ freeswitch (1.0.7)
|
|||
mod_easyroute: Fix possible segfaults and memory leak during unload, and add new setting odbc-retries (r:7fbc47f8/FS-2973)
|
||||
mod_enum: switch mod_enum to use new portable in-tree version (r:2bbc37e3)
|
||||
mod_enum: fix race condition between ldns configure creating ldns/util.h and mod_enum (r:87884c5c)
|
||||
mod_enum: fix ms resolution with new query-timeout-ms, query-timeout still works as expected (r:88f4828c/FS-3282)
|
||||
mod_enum: fix ldns_lookup not respecting query-timeout (r:1d490df9/FS-3282)
|
||||
mod_erlang_event: Make XML fetch reply ACKs distinguishable, update freeswitch.erl (r:9d44ed04)
|
||||
mod_erlang_event: Add 3 new commands; session_event, session_noevents, session_nixevent (r:698fa045)
|
||||
mod_erlang_event: generate long node names the same as erlang does (r:9ad509c2)
|
||||
|
@ -453,7 +479,9 @@ freeswitch (1.0.7)
|
|||
mod_event_socket: Add "-ERR" to api cmd response when failure occurs (r:58759052/FS-2827)
|
||||
mod_event_socket: clear unique headers on event_socket filters (r:436413e0)
|
||||
mod_event_socket: Unlock mutex to prevent mortuus obfirmo (r:64bc1938/FS-3156/FS-3157)
|
||||
mod_event_socket: (and mod_erlang_event) make empty apply-inbound-acl config line not deny all (r:8ae9ab5d/FS-3034)
|
||||
mod_event_zmq: Intitial mod_event_zmq code (r:4d554067)
|
||||
mod_event_zmq: Update download file from 2.1.3 to 2.1.4 (2.1.3 tar file is gone from zmq server) (r:0b780702)
|
||||
mod_fifo: allow multiple dtmf to exit fifo, set fifo_caller_exit_key to specify which (MODAPP-420)
|
||||
mod_fifo: cancel outbound call if customer hangs up (r:cadb4d94)
|
||||
mod_fifo: add taking_calls param to fifo member add and config file (r:821488bf)
|
||||
|
@ -500,6 +528,8 @@ freeswitch (1.0.7)
|
|||
mod_freetdm: created cmake files for freetdm (r:fc55997b)
|
||||
mod_freetdm: ss7 - added support to control mtp2, mtp3, and isup timers via freetdm.conf.xml (r:4455d581)
|
||||
mod_freetdm: made ftmod_r2 use FTDM_SPAN_USE_SIGNALS_QUEUE and properly send FTDM_SIGEVENT_SIGSTATUS_CHANGED (r:af5f0a4a)
|
||||
mod_freetdm: add specific alarm status in dump (r:7c971707)
|
||||
mod_freetdm: make ananlog alarm (r:23d86585)
|
||||
mod_fsk: add mod_fsk (r:fcc912a9)
|
||||
mod_gsmopen: copy from branch
|
||||
mod_gsmopen: fix FS-2793, compilation stops (r:355c0dbb/FS-2793)
|
||||
|
@ -526,6 +556,7 @@ freeswitch (1.0.7)
|
|||
mod_h323: Add mod_h323 to windows (r:015bcaf6/MODENDP-301)
|
||||
mod_h323: move PTrace level set to FSH323EndPoint::Initialise. partially apply patch from from Peter Olsson, Remove UnLock() when TryLock() failed and DEBUG_RTP_PACKETS directiv e. (r:7b5803f7)
|
||||
mod_h323: set network_addr of caller profile to signaling ip address. (requested by Steven Ayre) (r:072bf5ad)
|
||||
mod_h323: fix race condition on destroying signaling thread in h323 library (r:c22aac0e)
|
||||
mod_java: fix eventConsumer issue and add flush() method (r:7fd3aff6)
|
||||
mod_java: Allow user defined java methods to be called at startup and shutdown of JVM (r:1339e218/MODLANG-117)
|
||||
mod_json_cdr: Fix segfault in mod_json_cdr.c (r:f347698a/MODEVENT-66)
|
||||
|
@ -542,12 +573,15 @@ freeswitch (1.0.7)
|
|||
mod_lcr: don't count twice (r:eaeabc7b/FS-1810)
|
||||
mod_lcr: properly destroy lcr object when done (r:084819a3/FS-3199)
|
||||
mod_lcr: don't add routes that have no rate of the desired type (r:82e3ccf8)
|
||||
mod_lcr: fix "as xml" for larger number of arguments (r:3dca2ebb/FS-3283)
|
||||
mod_lcr: fix malformed XML when has embedded %s (r:5fa9619f/FS-3284)
|
||||
mod_loopback: add loopback_bowout_on_execute var to make 1 legged loopback calls bow out of the picture
|
||||
mod_loopback: only execute app once in app mode (r:64f58f2d)
|
||||
mod_loopback: fix bug in mod_loopback where bowout=false (r:e9ab5368)
|
||||
mod_loopback: pass indication when in app mode on mod_loopback (r:c423e209)
|
||||
mod_loopback: fix voicemail failure (r:1a1881e8/FS-2795)
|
||||
mod_loopback: pass ring_ready like we do with pre_answer (r:9d087d45)
|
||||
mod_loopback: refactor mod_loopback timeout handling (r:43442e4f)
|
||||
mod_lua: Add switch_core_sqldb functionality from inside Lua script (r:26f2e095/FS-1384)
|
||||
mod_lua: Made 2nd arg to freeswitch.Dbh:query (cb func) optional (r:87db11af)
|
||||
mod_lua: Added SAF_ROUTING_EXEC flag to lua app, so it can be run inline (r:7d5ca1c0)
|
||||
|
@ -559,11 +593,13 @@ freeswitch (1.0.7)
|
|||
mod_managed: Added wrapper for switch_event_bind for .net (r:a5f07a80/MODLANG-165)
|
||||
mod_managed: add additional support (r:5be58aac)
|
||||
mod_managed: add mono 2.8 patch file see FS-2774 (r:6a948bd9/FS-2774)
|
||||
mod_mongo: New mod, initial commit; module for MongoDB (http://www.mongodb.org/) (r:dc6ca6f8/FS-3278)
|
||||
mod_mp4v: MP4V-ES passthru for washibechi on IRC
|
||||
mod_mp4: New module. Supports playback of MP4 files. Depends on libmp4v2 <http://code.google.com/p/mp4v2/> (originally compiled against v1.6.1)
|
||||
mod_nibblebill: free allocated mem at shutdown; free properly if using custom_sql
|
||||
mod_nibblebill: Add SAF_SUPPORT_NOMEDIA to nibblebill
|
||||
mod_nibblebill: fix compile issues in latest HEAD (r:b073e82b/FSMOD-51)
|
||||
mod_nibblebill: remove on_reporting hook (r:897e6573/FS-2890)
|
||||
mod_openzap: custom data (r:5d4db94d)
|
||||
mod_openzap: more ss7 custom data (r:c93e392d)
|
||||
mod_openzap: handle loop requests (r:23766e36)
|
||||
|
@ -579,6 +615,9 @@ freeswitch (1.0.7)
|
|||
mod_portaudio: mod_portaudio improvements and bug fixes (r:33b74ca8/FS-3006)
|
||||
mod_portaudio: Add pa devlist to portaudio webapi (r:e8f10ea3)
|
||||
mod_protovm: This is a very early new prototype voicemail ivr system. You need to copy the sounds.xml and make it loadale in the language folder and protovm.conf.xml inside the autoload_configs folder. Configs file will most definitly change. Once stabilized, we make it install those file by default. (r:fb549777)
|
||||
mod_radius_cdr: Add 'Freeswitch-Direction' av pair (r:a5170df0)
|
||||
mod_radius_cdr: Add 'Freeswitch-Other-Leg-Id' av pair (r:18d29b46)
|
||||
mod_radius_cdr: log errors with the call's uuid (r:fee49b16)
|
||||
mod_sangoma_codec: Add sample config file
|
||||
mod_sangoma_codec: added load/noload options for the supported codecs
|
||||
mod_sangoma_codec: rename load/noload to register/noregister
|
||||
|
@ -594,6 +633,7 @@ freeswitch (1.0.7)
|
|||
mod_sangoma_codec: add siren7 32kbps (r:fcaf2677)
|
||||
mod_sangoma_codec: add SIREN7 24kbps (r:3acc5fdb)
|
||||
mod_say: Fix crash for Say Number Pronounced with numbers of more than 9 digits (r:06bccf28/FS-3202)
|
||||
mod_say_de: method PRONOUNCED - grammatical fixes, thank you Christian Benke (r:5d46ddbc/FS-3195)
|
||||
mod_say_en: introduce new say_string method of doing say and use it in mod_say_en as an example. try: eval ${say_string en.gsm en current_date_time pronounced ${strepoch()}} from the cli with this patch. We can do more to centralize the say things and go back and apply it to other langs, using this method you can set the desired file ext as well which I think is a bounty.... (r:d5ef86d7)
|
||||
mod_say_en: If you only tell SAY CURRENCY to say 100 it should only say 100 dollars without the "0 cents" (r:426a4e76/FS-2922)
|
||||
mod_say_es: fix grammar when saying dates and time (r:6bed19b2/MODAPP-429)
|
||||
|
@ -630,6 +670,8 @@ freeswitch (1.0.7)
|
|||
mod_skypopen: ignore early media sent by channels to be bridged before our channel is answered (r:ef14b78a)
|
||||
mod_skypopen: OSS driver, refinement (r:b0a23f8e)
|
||||
mod_skypopen: deleted osscuse subdir (r:4842a620)
|
||||
mod_skypopen: adding installer and Skype client configuration directories (to be announced :) ) (r:25ebf715)
|
||||
mod_skypopen: refining INTERACTIVE INSTALLER for Linux (to be announced :) ) (r:aa7f47ac)
|
||||
mod_snapshot: fix bad codepaths in mod_snapshot (r:844ac220)
|
||||
mod_sndfile: Add support for .alaw and .ulaw to mod_sndfile (r:facf09b8/MODFORM-41)
|
||||
mod_sndfile: return break in mod_sndfile when seek returns failure (r:564dc7e4)
|
||||
|
@ -790,6 +832,14 @@ freeswitch (1.0.7)
|
|||
mod_sofia: Don't assume incoming "gw" contact param is valid (prevent possible DoS) (r:2b6f7070/FS-3244)
|
||||
mod_sofia: offer both avp and savp when using srtp (r:5857495e)
|
||||
mod_sofia: fix race in sla (r:a4ed829d)
|
||||
mod_sofia: Fix segfault when no channel is present and need to print err msg (r:ce5c8462/FS-3236)
|
||||
mod_sofia: don't nat map on loopback addrs (r:e70af1f8)
|
||||
mod_sofia: Add reporting chan vars: sip_bye_content_type and sip_bye_payload (r:2d856f8f/FS-3276)
|
||||
mod_sofia: Add "tel:" patch - thanks jaybinks (r:154731a7)
|
||||
mod_sofia: fix rare t38 gateway issue (r:123eaa52)
|
||||
mod_sofia: fix sofia presence with dial does not maintain version number correctly (r:3ebd173c/FS-3307)
|
||||
mod_sofia: fix One way audio problem from B-leg of the call on Session Refresh and HOLD if B-leg is using a dynamic payload type (r:66d16d17/FS-3270)
|
||||
mod_sofia: chat API issue: dup_dest was being overwritten by switch_split_user_domain (r:765908f3/FS-3152)
|
||||
mod_spandsp: initial checkin of mod_fax/mod_voipcodecs merge into mod_spandsp (r:fa9a59a8)
|
||||
mod_spandsp: rework of new mod_spandsp to have functions broken up into different c files (r:65400642)
|
||||
mod_spandsp: improve duplicate digit detection and add 'min_dup_digit_spacing_ms' channel variable for use with the dtmf detector (r:eab4f246/FSMOD-45)
|
||||
|
@ -804,6 +854,8 @@ freeswitch (1.0.7)
|
|||
mod_spandsp: Fire event when fax is finished; indicates result of fax attempt (r:314a2a1e/FS-3004)
|
||||
mod_spandsp: new option to set sip_execute_on_image to 't38_gateway self nocng' this should skip the tone detection adn go right into the gateway mode so you should be able to do only this and have it work based on remote re-invite (r:9227b538/FS-3252)
|
||||
mod_spandsp: additional fix to this bug and add better fax detect code to mod_spandsp (r:7fe313cf/FS-3252)
|
||||
mod_spandsp: Fire event when fax finishes indicating result (r:a57336ba/FS-3004)
|
||||
mod_spandsp: Prevent hung chans on fax errors (r:789a9ce8/FS-3213)
|
||||
mod_spidermonkey: allow vars to be set containing vars from languages (r:5cd072a3)
|
||||
mod_spidermonkey: fix seg in js hangup (r:7d554c11)
|
||||
mod_spidermonkey: Fix mod_spidermonkey build on FreeBSD, (Undefined symbol PR_LocalTimeParameters). (r:3edb8419)
|
||||
|
@ -855,6 +907,7 @@ freeswitch (1.0.7)
|
|||
tools: Add fs_encode tool (r:89b17601)
|
||||
tools: Add randomize-passwords.pl script to main tree (r:5e6123ef)
|
||||
tools: Change logger.pl host flag to -H from -h (conflicted w/ -h for help); add -H/--host to usage (r:73ca862c)
|
||||
tools: Add sound_test.lua utility script (lets you listen to all the sound files in a particular rate/type combo (r:1a71dbf2)
|
||||
|
||||
freeswitch (1.0.6)
|
||||
|
||||
|
|
|
@ -491,6 +491,9 @@
|
|||
<prompt phrase="Normal clearing" filename="ivr-normal_clearing.wav"/>
|
||||
|
||||
<!-- The following phrases still need to be recorded -->
|
||||
<prompt phrase="This conference is full. Please contact the conference moderator." filename="conf-conference_is_full.wav"/>
|
||||
<prompt phrase="You do not have permission to perform this action." filename="ivr-not_have_permission.wav"/>
|
||||
<prompt phrase="" filename=""/>
|
||||
</ivr>
|
||||
|
||||
<misc>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
# includes module(s): freeswitch-devel freeswitch-codec-passthru-amr freeswitch-codec-passthru-amrwb freeswitch-codec-passthru-g729
|
||||
# freeswitch-codec-passthru-g7231 freeswitch-lua freeswitch-perl freeswitch-python freeswitch-spidermonkey
|
||||
# freeswitch-lan-de freeswitch-lang-en freeswitch-lang-fr freeswitch-lang-ru freeswitch-freetdm
|
||||
# freeswitch-lan-de freeswitch-lang-en freeswitch-lang-fr freeswitch-lang-hu freeswitch-lang-ru freeswitch-freetdm
|
||||
#
|
||||
# Initial Version Copyright (C) 2007 Peter Nixon and Michal Bielicki, All Rights Reserved.
|
||||
#
|
||||
|
@ -471,7 +471,7 @@ DIRECTORIES_MODULES=""
|
|||
#
|
||||
######################################################################################################################
|
||||
ENDPOINTS_MODULES="endpoints/mod_dingaling endpoints/mod_loopback ../../libs/freetdm/mod_freetdm endpoints/mod_portaudio \
|
||||
endpoints/mod_sofia endpoints/mod_skinny endpoints/mod_skypopen"
|
||||
endpoints/mod_sofia endpoints/mod_skinny endpoints/mod_skypopen endpoints/mod_rtmp"
|
||||
|
||||
######################################################################################################################
|
||||
#
|
||||
|
@ -785,6 +785,7 @@ fi
|
|||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/post_load_modules.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/redis.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/rss.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/rtmp.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/sangoma_codec.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/shout.conf.xml
|
||||
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/skinny.conf.xml
|
||||
|
@ -924,6 +925,7 @@ fi
|
|||
%{prefix}/mod/mod_portaudio_stream.so*
|
||||
%{prefix}/mod/mod_redis.so*
|
||||
%{prefix}/mod/mod_rss.so*
|
||||
%{prefix}/mod/mod_rtmp.so*
|
||||
%{prefix}/mod/mod_shout.so*
|
||||
%{prefix}/mod/mod_silk.so*
|
||||
%{prefix}/mod/mod_siren.so*
|
||||
|
@ -1127,6 +1129,8 @@ fi
|
|||
#
|
||||
######################################################################################################################
|
||||
%changelog
|
||||
* Tue Jun 14 2011 - michal.bielicki@seventhsignal.de
|
||||
- added mod_rtmp
|
||||
* Fri Apr 01 2011 - michal.bielicki@seventhsignal.de
|
||||
- added hebrew language stuff
|
||||
* Wed Mar 30 2011 - michal.bielicki@seventhsignal.de
|
||||
|
|
|
@ -276,6 +276,17 @@
|
|||
/ldns/packaging/ldns-config
|
||||
/ldns/packaging/libldns.pc
|
||||
/ldns-1.6.9/
|
||||
/libcodec2/src/c2dec
|
||||
/libcodec2/src/c2enc
|
||||
/libcodec2/src/c2sim
|
||||
/libcodec2/unittest/extract
|
||||
/libcodec2/unittest/genlsp
|
||||
/libcodec2/unittest/genres
|
||||
/libcodec2/unittest/tcodec2
|
||||
/libcodec2/unittest/tinterp
|
||||
/libcodec2/unittest/tnlp
|
||||
/libcodec2/unittest/tquant
|
||||
/libcodec2/unittest/vqtrain
|
||||
/libdingaling/Makefile
|
||||
/libdingaling/Makefile.in
|
||||
/libdingaling/aclocal.m4
|
||||
|
@ -986,6 +997,7 @@
|
|||
/xmlrpc-c/stamp-h2
|
||||
/xmlrpc-c/xmlrpc_amconfig.h
|
||||
/xmlrpc-c/xmlrpc_config.h
|
||||
/zeromq-*/
|
||||
/apr/build/install-sh
|
||||
/js/install-sh
|
||||
/js/nsprpub/lib/ds/libplds4.dylib
|
||||
|
@ -1035,7 +1047,7 @@
|
|||
/libshout-2.2.2/
|
||||
/mpg123/
|
||||
/openldap-2.4.19/
|
||||
/pocketsphinx-0.5.99/
|
||||
/pocketsphinx-0.7/
|
||||
/portaudio/bin-stamp
|
||||
/portaudio/bin/
|
||||
/portaudio/lib-stamp
|
||||
|
@ -1043,7 +1055,7 @@
|
|||
/silk/Encoder
|
||||
/silk/signalCompare
|
||||
/soundtouch-1.3.1/
|
||||
/sphinxbase-0.4.99/
|
||||
/sphinxbase-0.7/
|
||||
/unimrcp/platforms/asr-client/asrclient
|
||||
/unimrcp/platforms/umc/umc
|
||||
/unimrcp/platforms/unimrcp-client/unimrcpclient
|
||||
|
@ -1067,7 +1079,6 @@
|
|||
/libogg-1.1.3/
|
||||
/pthreads-w32-2-7-0-release/
|
||||
/sounds/
|
||||
/sphinxbase-0.4.99/
|
||||
/sofia-sip/libsofia-sip-ua/http/http_tag_dll.c
|
||||
/sofia-sip/libsofia-sip-ua/iptsec/auth_tag_dll.c
|
||||
/sofia-sip/libsofia-sip-ua/msg/msg_tag_dll.c
|
||||
|
|
|
@ -34,10 +34,10 @@ testclient: $(MYLIB) testclient.c
|
|||
fs_cli: $(MYLIB) fs_cli.c
|
||||
$(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs $(LIBS) -ledit
|
||||
|
||||
%.o: %.c
|
||||
%.o: %.c $(HEADERS)
|
||||
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp $(HEADERS)
|
||||
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
|
|
|
@ -572,7 +572,7 @@ COLORS[] = { ESL_SEQ_DEFAULT_COLOR, ESL_SEQ_FRED, ESL_SEQ_FRED,
|
|||
ESL_SEQ_FRED, ESL_SEQ_FMAGEN, ESL_SEQ_FCYAN, ESL_SEQ_FGREEN, ESL_SEQ_FYELLOW };
|
||||
|
||||
static int usage(char *name){
|
||||
printf("Usage: %s [-H <host>] [-P <port>] [-p <secret>] [-d <level>] [-x command] [profile]\n\n", name);
|
||||
printf("Usage: %s [-H <host>] [-P <port>] [-p <secret>] [-d <level>] [-x command] [-t <timeout_ms>] [profile]\n\n", name);
|
||||
printf(" -?,-h --help Usage Information\n");
|
||||
printf(" -H, --host=hostname Host to connect\n");
|
||||
printf(" -P, --port=port Port to connect (1 - 65535)\n");
|
||||
|
@ -584,7 +584,8 @@ static int usage(char *name){
|
|||
printf(" -q, --quiet Disable logging\n");
|
||||
printf(" -r, --retry Retry connection on failure\n");
|
||||
printf(" -R, --reconnect Reconnect if disconnected\n");
|
||||
printf(" -d, --debug=level Debug Level (0 - 7)\n\n");
|
||||
printf(" -d, --debug=level Debug Level (0 - 7)\n");
|
||||
printf(" -t, --timeout Timeout for API commands (in miliseconds)\n\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1026,6 +1027,7 @@ int main(int argc, char *argv[])
|
|||
{"retry", 0, 0, 'r'},
|
||||
{"interrupt", 0, 0, 'i'},
|
||||
{"reconnect", 0, 0, 'R'},
|
||||
{"timeout", 1, 0, 't'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
@ -1044,7 +1046,7 @@ int main(int argc, char *argv[])
|
|||
char argv_command[1024] = "";
|
||||
char argv_loglevel[128] = "";
|
||||
int argv_quiet = 0;
|
||||
int loops = 2, reconnect = 0;
|
||||
int loops = 2, reconnect = 0, timeout = 0;
|
||||
|
||||
strncpy(internal_profile.host, "127.0.0.1", sizeof(internal_profile.host));
|
||||
strncpy(internal_profile.pass, "ClueCon", sizeof(internal_profile.pass));
|
||||
|
@ -1069,7 +1071,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
for(;;) {
|
||||
int option_index = 0;
|
||||
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:qrRhi?", options, &option_index);
|
||||
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:t:qrRhi?", options, &option_index);
|
||||
if (opt == -1) break;
|
||||
switch (opt)
|
||||
{
|
||||
|
@ -1122,6 +1124,9 @@ int main(int argc, char *argv[])
|
|||
case 'R':
|
||||
reconnect = 1;
|
||||
break;
|
||||
case 't':
|
||||
timeout = atoi(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
case '?':
|
||||
print_banner(stdout);
|
||||
|
@ -1278,7 +1283,17 @@ int main(int argc, char *argv[])
|
|||
const char *err = NULL;
|
||||
|
||||
snprintf(cmd_str, sizeof(cmd_str), "api %s\n\n", argv_command);
|
||||
esl_send_recv(&handle, cmd_str);
|
||||
if (timeout) {
|
||||
esl_status_t status = esl_send_recv_timed(&handle, cmd_str, timeout);
|
||||
if (status != ESL_SUCCESS) {
|
||||
printf("Request timed out.\n");
|
||||
esl_disconnect(&handle);
|
||||
return -2;
|
||||
}
|
||||
} else {
|
||||
esl_send_recv(&handle, cmd_str);
|
||||
}
|
||||
|
||||
if (handle.last_sr_event) {
|
||||
if (handle.last_sr_event->body) {
|
||||
printf("%s\n", handle.last_sr_event->body);
|
||||
|
|
|
@ -419,10 +419,11 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1setPriority
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
|
||||
SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
|
||||
jstring jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
|
@ -434,7 +435,8 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JN
|
|||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
arg3 = (int)jarg3;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
if(result) jresult = jenv->NewStringUTF((const char *)result);
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
return jresult;
|
||||
|
@ -522,6 +524,64 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1addHeader(J
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1pushHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ESLevent **)&jarg1;
|
||||
arg2 = 0;
|
||||
if (jarg2) {
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
arg3 = 0;
|
||||
if (jarg3) {
|
||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||
if (!arg3) return 0;
|
||||
}
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = (jboolean)result;
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1unshiftHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ESLevent **)&jarg1;
|
||||
arg2 = 0;
|
||||
if (jarg2) {
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
arg3 = 0;
|
||||
if (jarg3) {
|
||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||
if (!arg3) return 0;
|
||||
}
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = (jboolean)result;
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1delHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
|
||||
jboolean jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
|
|
@ -78,8 +78,8 @@ public class ESLevent {
|
|||
return eslJNI.ESLevent_setPriority(swigCPtr, this, SWIGTYPE_p_esl_priority_t.getCPtr(priority));
|
||||
}
|
||||
|
||||
public String getHeader(String header_name) {
|
||||
return eslJNI.ESLevent_getHeader(swigCPtr, this, header_name);
|
||||
public String getHeader(String header_name, int idx) {
|
||||
return eslJNI.ESLevent_getHeader(swigCPtr, this, header_name, idx);
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
|
@ -98,6 +98,14 @@ public class ESLevent {
|
|||
return eslJNI.ESLevent_addHeader(swigCPtr, this, header_name, value);
|
||||
}
|
||||
|
||||
public boolean pushHeader(String header_name, String value) {
|
||||
return eslJNI.ESLevent_pushHeader(swigCPtr, this, header_name, value);
|
||||
}
|
||||
|
||||
public boolean unshiftHeader(String header_name, String value) {
|
||||
return eslJNI.ESLevent_unshiftHeader(swigCPtr, this, header_name, value);
|
||||
}
|
||||
|
||||
public boolean delHeader(String header_name) {
|
||||
return eslJNI.ESLevent_delHeader(swigCPtr, this, header_name);
|
||||
}
|
||||
|
|
|
@ -21,11 +21,13 @@ class eslJNI {
|
|||
public final static native void delete_ESLevent(long jarg1);
|
||||
public final static native String ESLevent_serialize(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native boolean ESLevent_setPriority(long jarg1, ESLevent jarg1_, long jarg2);
|
||||
public final static native String ESLevent_getHeader(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native String ESLevent_getHeader(long jarg1, ESLevent jarg1_, String jarg2, int jarg3);
|
||||
public final static native String ESLevent_getBody(long jarg1, ESLevent jarg1_);
|
||||
public final static native String ESLevent_getType(long jarg1, ESLevent jarg1_);
|
||||
public final static native boolean ESLevent_addBody(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native boolean ESLevent_addHeader(long jarg1, ESLevent jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ESLevent_pushHeader(long jarg1, ESLevent jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ESLevent_unshiftHeader(long jarg1, ESLevent jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ESLevent_delHeader(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native String ESLevent_firstHeader(long jarg1, ESLevent jarg1_);
|
||||
public final static native String ESLevent_nextHeader(long jarg1, ESLevent jarg1_);
|
||||
|
|
|
@ -1923,18 +1923,23 @@ static int _wrap_ESLevent_getHeader(lua_State* L) {
|
|||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
|
||||
SWIG_check_num_args("getHeader",2,2)
|
||||
SWIG_check_num_args("getHeader",2,3)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getHeader",1,"ESLevent *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("getHeader",2,"char const *");
|
||||
if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("getHeader",3,"int");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
|
||||
SWIG_fail_ptr("ESLevent_getHeader",1,SWIGTYPE_p_ESLevent);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if(lua_gettop(L)>=3){
|
||||
arg3 = (int)lua_tonumber(L, 3);
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
SWIG_arg=0;
|
||||
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
@ -2056,6 +2061,68 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
static int _wrap_ESLevent_pushHeader(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
SWIG_check_num_args("pushHeader",3,3)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("pushHeader",1,"ESLevent *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("pushHeader",2,"char const *");
|
||||
if(!lua_isstring(L,3)) SWIG_fail_arg("pushHeader",3,"char const *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
|
||||
SWIG_fail_ptr("ESLevent_pushHeader",1,SWIGTYPE_p_ESLevent);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_arg=0;
|
||||
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_ESLevent_unshiftHeader(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
SWIG_check_num_args("unshiftHeader",3,3)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("unshiftHeader",1,"ESLevent *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("unshiftHeader",2,"char const *");
|
||||
if(!lua_isstring(L,3)) SWIG_fail_arg("unshiftHeader",3,"char const *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
|
||||
SWIG_fail_ptr("ESLevent_unshiftHeader",1,SWIGTYPE_p_ESLevent);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_arg=0;
|
||||
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_ESLevent_delHeader(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
@ -2146,6 +2213,8 @@ static swig_lua_method swig_ESLevent_methods[] = {
|
|||
{"getType", _wrap_ESLevent_getType},
|
||||
{"addBody", _wrap_ESLevent_addBody},
|
||||
{"addHeader", _wrap_ESLevent_addHeader},
|
||||
{"pushHeader", _wrap_ESLevent_pushHeader},
|
||||
{"unshiftHeader", _wrap_ESLevent_unshiftHeader},
|
||||
{"delHeader", _wrap_ESLevent_delHeader},
|
||||
{"firstHeader", _wrap_ESLevent_firstHeader},
|
||||
{"nextHeader", _wrap_ESLevent_nextHeader},
|
||||
|
|
|
@ -221,7 +221,7 @@ class ESLPINVOKE {
|
|||
public static extern bool ESLevent_SetPriority(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_GetHeader")]
|
||||
public static extern string ESLevent_GetHeader(HandleRef jarg1, string jarg2);
|
||||
public static extern string ESLevent_GetHeader(HandleRef jarg1, string jarg2, int jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_GetBody")]
|
||||
public static extern string ESLevent_GetBody(HandleRef jarg1);
|
||||
|
@ -235,6 +235,12 @@ class ESLPINVOKE {
|
|||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_AddHeader")]
|
||||
public static extern bool ESLevent_AddHeader(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_pushHeader")]
|
||||
public static extern bool ESLevent_pushHeader(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_unshiftHeader")]
|
||||
public static extern bool ESLevent_unshiftHeader(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_DelHeader")]
|
||||
public static extern bool ESLevent_DelHeader(HandleRef jarg1, string jarg2);
|
||||
|
||||
|
|
|
@ -89,8 +89,8 @@ public class ESLevent : IDisposable {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public string GetHeader(string header_name) {
|
||||
string ret = ESLPINVOKE.ESLevent_GetHeader(swigCPtr, header_name);
|
||||
public string GetHeader(string header_name, int idx) {
|
||||
string ret = ESLPINVOKE.ESLevent_GetHeader(swigCPtr, header_name, idx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -114,6 +114,16 @@ public class ESLevent : IDisposable {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public bool pushHeader(string header_name, string value) {
|
||||
bool ret = ESLPINVOKE.ESLevent_pushHeader(swigCPtr, header_name, value);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool unshiftHeader(string header_name, string value) {
|
||||
bool ret = ESLPINVOKE.ESLevent_unshiftHeader(swigCPtr, header_name, value);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool DelHeader(string header_name) {
|
||||
bool ret = ESLPINVOKE.ESLevent_DelHeader(swigCPtr, header_name);
|
||||
return ret;
|
||||
|
|
|
@ -436,15 +436,17 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_SetPriority(void * jarg1, vo
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_GetHeader(void * jarg1, char * jarg2) {
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_GetHeader(void * jarg1, char * jarg2, int jarg3) {
|
||||
char * jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (ESLevent *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
arg3 = (int)jarg3;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
@ -504,6 +506,38 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_AddHeader(void * jarg1, char
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_pushHeader(void * jarg1, char * jarg2, char * jarg3) {
|
||||
unsigned int jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (ESLevent *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_unshiftHeader(void * jarg1, char * jarg2, char * jarg3) {
|
||||
unsigned int jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (ESLevent *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_DelHeader(void * jarg1, char * jarg2) {
|
||||
unsigned int jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
|
|
@ -88,6 +88,8 @@ sub DESTROY {
|
|||
*getType = *ESLc::ESLevent_getType;
|
||||
*addBody = *ESLc::ESLevent_addBody;
|
||||
*addHeader = *ESLc::ESLevent_addHeader;
|
||||
*pushHeader = *ESLc::ESLevent_pushHeader;
|
||||
*unshiftHeader = *ESLc::ESLevent_unshiftHeader;
|
||||
*delHeader = *ESLc::ESLevent_delHeader;
|
||||
*firstHeader = *ESLc::ESLevent_firstHeader;
|
||||
*nextHeader = *ESLc::ESLevent_nextHeader;
|
||||
|
|
|
@ -2285,17 +2285,20 @@ XS(_wrap_ESLevent_getHeader) {
|
|||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 2) || (items > 2)) {
|
||||
SWIG_croak("Usage: ESLevent_getHeader(self,header_name);");
|
||||
if ((items < 2) || (items > 3)) {
|
||||
SWIG_croak("Usage: ESLevent_getHeader(self,header_name,idx);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
|
@ -2307,14 +2310,23 @@ XS(_wrap_ESLevent_getHeader) {
|
|||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if (items > 2) {
|
||||
ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ESLevent_getHeader" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
@ -2465,6 +2477,106 @@ XS(_wrap_ESLevent_addHeader) {
|
|||
}
|
||||
|
||||
|
||||
XS(_wrap_ESLevent_pushHeader) {
|
||||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 3) || (items > 3)) {
|
||||
SWIG_croak("Usage: ESLevent_pushHeader(self,header_name,value);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_pushHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_pushHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_pushHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ESLevent_unshiftHeader) {
|
||||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 3) || (items > 3)) {
|
||||
SWIG_croak("Usage: ESLevent_unshiftHeader(self,header_name,value);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_unshiftHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_unshiftHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_unshiftHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ESLevent_delHeader) {
|
||||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
@ -3658,6 +3770,8 @@ static swig_command_info swig_commands[] = {
|
|||
{"ESLc::ESLevent_getType", _wrap_ESLevent_getType},
|
||||
{"ESLc::ESLevent_addBody", _wrap_ESLevent_addBody},
|
||||
{"ESLc::ESLevent_addHeader", _wrap_ESLevent_addHeader},
|
||||
{"ESLc::ESLevent_pushHeader", _wrap_ESLevent_pushHeader},
|
||||
{"ESLc::ESLevent_unshiftHeader", _wrap_ESLevent_unshiftHeader},
|
||||
{"ESLc::ESLevent_delHeader", _wrap_ESLevent_delHeader},
|
||||
{"ESLc::ESLevent_firstHeader", _wrap_ESLevent_firstHeader},
|
||||
{"ESLc::ESLevent_nextHeader", _wrap_ESLevent_nextHeader},
|
||||
|
|
|
@ -76,8 +76,8 @@ class ESLevent {
|
|||
return $r;
|
||||
}
|
||||
|
||||
function getHeader($header_name) {
|
||||
return ESLevent_getHeader($this->_cPtr,$header_name);
|
||||
function getHeader($header_name,$idx=-1) {
|
||||
return ESLevent_getHeader($this->_cPtr,$header_name,$idx);
|
||||
}
|
||||
|
||||
function getBody() {
|
||||
|
@ -96,6 +96,14 @@ class ESLevent {
|
|||
return ESLevent_addHeader($this->_cPtr,$header_name,$value);
|
||||
}
|
||||
|
||||
function pushHeader($header_name,$value) {
|
||||
return ESLevent_pushHeader($this->_cPtr,$header_name,$value);
|
||||
}
|
||||
|
||||
function unshiftHeader($header_name,$value) {
|
||||
return ESLevent_unshiftHeader($this->_cPtr,$header_name,$value);
|
||||
}
|
||||
|
||||
function delHeader($header_name) {
|
||||
return ESLevent_delHeader($this->_cPtr,$header_name);
|
||||
}
|
||||
|
|
|
@ -1445,13 +1445,16 @@ fail:
|
|||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_getHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
zval **args[2];
|
||||
zval **args[3];
|
||||
int arg_count;
|
||||
|
||||
SWIG_ResetError();
|
||||
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
arg_count = ZEND_NUM_ARGS();
|
||||
if(arg_count<2 || arg_count>3 ||
|
||||
zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
|
||||
WRONG_PARAM_COUNT;
|
||||
|
||||
{
|
||||
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLevent, 0) < 0) {
|
||||
|
@ -1465,7 +1468,14 @@ ZEND_NAMED_FUNCTION(_wrap_ESLevent_getHeader) {
|
|||
arg2 = (char *) Z_STRVAL_PP(args[1]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if(arg_count > 2) {
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
|
||||
convert_to_long_ex(args[2]);
|
||||
arg3 = (int) Z_LVAL_PP(args[2]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
{
|
||||
if(!result) {
|
||||
ZVAL_NULL(return_value);
|
||||
|
@ -1612,6 +1622,86 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_pushHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
zval **args[3];
|
||||
|
||||
SWIG_ResetError();
|
||||
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
{
|
||||
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLevent, 0) < 0) {
|
||||
SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESLevent_pushHeader. Expected SWIGTYPE_p_ESLevent");
|
||||
}
|
||||
}
|
||||
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
|
||||
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
|
||||
convert_to_string_ex(args[1]);
|
||||
arg2 = (char *) Z_STRVAL_PP(args[1]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
|
||||
convert_to_string_ex(args[2]);
|
||||
arg3 = (char *) Z_STRVAL_PP(args[2]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
{
|
||||
ZVAL_BOOL(return_value,(result)?1:0);
|
||||
}
|
||||
return;
|
||||
fail:
|
||||
zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
|
||||
}
|
||||
|
||||
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_unshiftHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
zval **args[3];
|
||||
|
||||
SWIG_ResetError();
|
||||
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
{
|
||||
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLevent, 0) < 0) {
|
||||
SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESLevent_unshiftHeader. Expected SWIGTYPE_p_ESLevent");
|
||||
}
|
||||
}
|
||||
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
|
||||
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
|
||||
convert_to_string_ex(args[1]);
|
||||
arg2 = (char *) Z_STRVAL_PP(args[1]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
|
||||
convert_to_string_ex(args[2]);
|
||||
arg3 = (char *) Z_STRVAL_PP(args[2]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
{
|
||||
ZVAL_BOOL(return_value,(result)?1:0);
|
||||
}
|
||||
return;
|
||||
fail:
|
||||
zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
|
||||
}
|
||||
|
||||
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_delHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
@ -2547,6 +2637,8 @@ static zend_function_entry ESL_functions[] = {
|
|||
SWIG_ZEND_NAMED_FE(eslevent_gettype,_wrap_ESLevent_getType,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_addbody,_wrap_ESLevent_addBody,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_addheader,_wrap_ESLevent_addHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_pushheader,_wrap_ESLevent_pushHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_unshiftheader,_wrap_ESLevent_unshiftHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_delheader,_wrap_ESLevent_delHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_firstheader,_wrap_ESLevent_firstHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_nextheader,_wrap_ESLevent_nextHeader,NULL)
|
||||
|
|
|
@ -46,6 +46,8 @@ ZEND_NAMED_FUNCTION(_wrap_ESLevent_getBody);
|
|||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_getType);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_addBody);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_addHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_pushHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_unshiftHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_delHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_firstHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_nextHeader);
|
||||
|
|
|
@ -59,6 +59,8 @@ class ESLevent:
|
|||
def getType(*args): return apply(_ESL.ESLevent_getType, args)
|
||||
def addBody(*args): return apply(_ESL.ESLevent_addBody, args)
|
||||
def addHeader(*args): return apply(_ESL.ESLevent_addHeader, args)
|
||||
def pushHeader(*args): return apply(_ESL.ESLevent_pushHeader, args)
|
||||
def unshiftHeader(*args): return apply(_ESL.ESLevent_unshiftHeader, args)
|
||||
def delHeader(*args): return apply(_ESL.ESLevent_delHeader, args)
|
||||
def firstHeader(*args): return apply(_ESL.ESLevent_firstHeader, args)
|
||||
def nextHeader(*args): return apply(_ESL.ESLevent_nextHeader, args)
|
||||
|
|
|
@ -3373,17 +3373,21 @@ SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), Py
|
|||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_getHeader",&obj0,&obj1)) SWIG_fail;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLevent_getHeader",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
|
@ -3394,9 +3398,16 @@ SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), Py
|
|||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
if (obj2) {
|
||||
ecode3 = SWIG_AsVal_int(obj2, &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ESLevent_getHeader" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
{
|
||||
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
SWIG_PYTHON_THREAD_END_ALLOW;
|
||||
}
|
||||
resultobj = SWIG_FromCharPtr((const char *)result);
|
||||
|
@ -3562,6 +3573,112 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ESLevent_pushHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_pushHeader",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_pushHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_pushHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_pushHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
{
|
||||
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_PYTHON_THREAD_END_ALLOW;
|
||||
}
|
||||
resultobj = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ESLevent_unshiftHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_unshiftHeader",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_unshiftHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_unshiftHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_unshiftHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
{
|
||||
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_PYTHON_THREAD_END_ALLOW;
|
||||
}
|
||||
resultobj = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ESLevent_delHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
@ -4726,6 +4843,8 @@ static PyMethodDef SwigMethods[] = {
|
|||
{ (char *)"ESLevent_getType", _wrap_ESLevent_getType, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_addBody", _wrap_ESLevent_addBody, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_addHeader", _wrap_ESLevent_addHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_pushHeader", _wrap_ESLevent_pushHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_unshiftHeader", _wrap_ESLevent_unshiftHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_delHeader", _wrap_ESLevent_delHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_firstHeader", _wrap_ESLevent_firstHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_nextHeader", _wrap_ESLevent_nextHeader, METH_VARARGS, NULL},
|
||||
|
|
|
@ -2396,15 +2396,18 @@ SWIGINTERN VALUE
|
|||
_wrap_ESLevent_getHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
VALUE vresult = Qnil;
|
||||
|
||||
if ((argc < 1) || (argc > 1)) {
|
||||
if ((argc < 1) || (argc > 2)) {
|
||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
|
@ -2417,7 +2420,14 @@ _wrap_ESLevent_getHeader(int argc, VALUE *argv, VALUE self) {
|
|||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if (argc > 1) {
|
||||
ecode3 = SWIG_AsVal_int(argv[1], &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","getHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
vresult = SWIG_FromCharPtr((const char *)result);
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
return vresult;
|
||||
|
@ -2556,6 +2566,98 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_wrap_ESLevent_pushHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
VALUE vresult = Qnil;
|
||||
|
||||
if ((argc < 2) || (argc > 2)) {
|
||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLevent *","pushHeader", 1, self ));
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pushHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","pushHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
vresult = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return vresult;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_wrap_ESLevent_unshiftHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
VALUE vresult = Qnil;
|
||||
|
||||
if ((argc < 2) || (argc > 2)) {
|
||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLevent *","unshiftHeader", 1, self ));
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","unshiftHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","unshiftHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
vresult = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return vresult;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_wrap_ESLevent_delHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
@ -3835,6 +3937,8 @@ SWIGEXPORT void Init_ESL(void) {
|
|||
rb_define_method(cESLevent.klass, "getType", VALUEFUNC(_wrap_ESLevent_getType), -1);
|
||||
rb_define_method(cESLevent.klass, "addBody", VALUEFUNC(_wrap_ESLevent_addBody), -1);
|
||||
rb_define_method(cESLevent.klass, "addHeader", VALUEFUNC(_wrap_ESLevent_addHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "pushHeader", VALUEFUNC(_wrap_ESLevent_pushHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "unshiftHeader", VALUEFUNC(_wrap_ESLevent_unshiftHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "delHeader", VALUEFUNC(_wrap_ESLevent_delHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "firstHeader", VALUEFUNC(_wrap_ESLevent_firstHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "nextHeader", VALUEFUNC(_wrap_ESLevent_nextHeader), -1);
|
||||
|
|
|
@ -1088,7 +1088,11 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
|||
if (hname && hval) {
|
||||
esl_url_decode(hval);
|
||||
esl_log(ESL_LOG_DEBUG, "RECV HEADER [%s] = [%s]\n", hname, hval);
|
||||
esl_event_add_header_string(revent, ESL_STACK_BOTTOM, hname, hval);
|
||||
if (!strncmp(hval, "ARRAY::", 7)) {
|
||||
esl_event_add_array(revent, hname, hval);
|
||||
} else {
|
||||
esl_event_add_header_string(revent, ESL_STACK_BOTTOM, hname, hval);
|
||||
}
|
||||
}
|
||||
|
||||
p = e;
|
||||
|
@ -1217,7 +1221,12 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
|||
esl_event_del_header(handle->last_ievent, "event-name");
|
||||
esl_name_event(hval, &handle->last_ievent->event_id);
|
||||
}
|
||||
esl_event_add_header_string(handle->last_ievent, ESL_STACK_BOTTOM, hname, hval);
|
||||
|
||||
if (!strncmp(hval, "ARRAY::", 7)) {
|
||||
esl_event_add_array(handle->last_ievent, hname, hval);
|
||||
} else {
|
||||
esl_event_add_header_string(handle->last_ievent, ESL_STACK_BOTTOM, hname, hval);
|
||||
}
|
||||
}
|
||||
|
||||
beg = c + 1;
|
||||
|
@ -1371,5 +1380,23 @@ ESL_DECLARE(esl_status_t) esl_send_recv_timed(esl_handle_t *handle, const char *
|
|||
}
|
||||
|
||||
|
||||
ESL_DECLARE(unsigned int) esl_separate_string_string(char *buf, const char *delim, char **array, unsigned int arraylen)
|
||||
{
|
||||
unsigned int count = 0;
|
||||
char *d;
|
||||
size_t dlen = strlen(delim);
|
||||
|
||||
array[count++] = buf;
|
||||
|
||||
while (count < arraylen && array[count - 1]) {
|
||||
if ((d = strstr(array[count - 1], delim))) {
|
||||
*d = '\0';
|
||||
d += dlen;
|
||||
array[count++] = d;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
@ -235,8 +235,7 @@ static unsigned int esl_ci_hashfunc_default(const char *char_key, esl_ssize_t *k
|
|||
return hash;
|
||||
}
|
||||
|
||||
|
||||
ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_name)
|
||||
ESL_DECLARE(esl_event_header_t *) esl_event_get_header_ptr(esl_event_t *event, const char *header_name)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
esl_ssize_t hlen = -1;
|
||||
|
@ -244,18 +243,39 @@ ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_n
|
|||
|
||||
esl_assert(event);
|
||||
|
||||
if (!header_name) return NULL;
|
||||
|
||||
if (!header_name)
|
||||
return NULL;
|
||||
|
||||
hash = esl_ci_hashfunc_default(header_name, &hlen);
|
||||
|
||||
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
if ((!hp->hash || hash == hp->hash) && !strcasecmp(hp->name, header_name) ) {
|
||||
return hp->value;
|
||||
if ((!hp->hash || hash == hp->hash) && !strcasecmp(hp->name, header_name)) {
|
||||
return hp;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *header_name, int idx)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
|
||||
if ((hp = esl_event_get_header_ptr(event, header_name))) {
|
||||
if (idx > -1) {
|
||||
if (idx < hp->idx) {
|
||||
return hp->array[idx];
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return hp->value;
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event)
|
||||
{
|
||||
return (event ? event->body : NULL);
|
||||
|
@ -264,7 +284,7 @@ ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event)
|
|||
ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const char *header_name, const char *val)
|
||||
{
|
||||
esl_event_header_t *hp, *lp = NULL, *tp;
|
||||
esl_status_t status = ESL_FAIL;
|
||||
esl_status_t status = ESL_FALSE;
|
||||
int x = 0;
|
||||
esl_ssize_t hlen = -1;
|
||||
unsigned long hash = 0;
|
||||
|
@ -273,12 +293,12 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
|
|||
while (tp) {
|
||||
hp = tp;
|
||||
tp = tp->next;
|
||||
|
||||
|
||||
x++;
|
||||
esl_assert(x < 1000);
|
||||
esl_assert(x < 1000000);
|
||||
hash = esl_ci_hashfunc_default(header_name, &hlen);
|
||||
|
||||
if (hp->name && (!hp->hash || hash == hp->hash) && !strcasecmp(header_name, hp->name) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
|
||||
if ((!hp->hash || hash == hp->hash) && (hp->name && !strcasecmp(header_name, hp->name)) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
|
||||
if (lp) {
|
||||
lp->next = hp->next;
|
||||
} else {
|
||||
|
@ -288,10 +308,27 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
|
|||
event->last_header = lp;
|
||||
}
|
||||
FREE(hp->name);
|
||||
FREE(hp->value);
|
||||
memset(hp, 0, sizeof(*hp));
|
||||
FREE(hp);
|
||||
|
||||
if (hp->idx) {
|
||||
int i = 0;
|
||||
hp->value = NULL;
|
||||
|
||||
for (i = 0; i < hp->idx; i++) {
|
||||
FREE(hp->array[i]);
|
||||
}
|
||||
FREE(hp->array);
|
||||
}
|
||||
|
||||
FREE(hp->value);
|
||||
|
||||
memset(hp, 0, sizeof(*hp));
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
if (esl_queue_trypush(EVENT_HEADER_RECYCLE_QUEUE, hp) != ESL_SUCCESS) {
|
||||
FREE(hp);
|
||||
}
|
||||
#else
|
||||
FREE(hp);
|
||||
#endif
|
||||
status = ESL_SUCCESS;
|
||||
} else {
|
||||
lp = hp;
|
||||
|
@ -301,40 +338,245 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
|
|||
return status;
|
||||
}
|
||||
|
||||
static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t stack, const char *header_name, char *data)
|
||||
static esl_event_header_t *new_header(const char *header_name)
|
||||
{
|
||||
esl_event_header_t *header;
|
||||
esl_ssize_t hlen = -1;
|
||||
|
||||
header = ALLOC(sizeof(*header));
|
||||
esl_assert(header);
|
||||
|
||||
if ((event->flags & ESL_UNIQ_HEADERS)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
void *pop;
|
||||
if (esl_queue_trypop(EVENT_HEADER_RECYCLE_QUEUE, &pop) == ESL_SUCCESS) {
|
||||
header = (esl_event_header_t *) pop;
|
||||
} else {
|
||||
#endif
|
||||
header = ALLOC(sizeof(*header));
|
||||
esl_assert(header);
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(header, 0, sizeof(*header));
|
||||
header->name = DUP(header_name);
|
||||
|
||||
return header;
|
||||
|
||||
}
|
||||
|
||||
ESL_DECLARE(int) esl_event_add_array(esl_event_t *event, const char *var, const char *val)
|
||||
{
|
||||
char *data;
|
||||
char **array;
|
||||
int max = 0;
|
||||
int len;
|
||||
const char *p;
|
||||
int i;
|
||||
|
||||
if (strlen(val) < 8) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(header, 0, sizeof(*header));
|
||||
p = val + 7;
|
||||
|
||||
header->name = DUP(header_name);
|
||||
header->value = data;
|
||||
header->hash = esl_ci_hashfunc_default(header->name, &hlen);
|
||||
max = 1;
|
||||
|
||||
while((p = strstr(p, "|:"))) {
|
||||
max++;
|
||||
p += 2;
|
||||
}
|
||||
|
||||
if (!max) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
data = strdup(val + 7);
|
||||
|
||||
if (stack == ESL_STACK_TOP) {
|
||||
header->next = event->headers;
|
||||
event->headers = header;
|
||||
if (!event->last_header) {
|
||||
len = (sizeof(char *) * max) + 1;
|
||||
array = malloc(len);
|
||||
esl_assert(array);
|
||||
memset(array, 0, len);
|
||||
|
||||
esl_separate_string_string(data, "|:", array, max);
|
||||
|
||||
for(i = 0; i < max; i++) {
|
||||
esl_event_add_header_string(event, ESL_STACK_PUSH, var, array[i]);
|
||||
}
|
||||
|
||||
free(array);
|
||||
free(data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t stack, const char *header_name, char *data)
|
||||
{
|
||||
esl_event_header_t *header = NULL;
|
||||
esl_ssize_t hlen = -1;
|
||||
int exists = 0, fly = 0;
|
||||
char *index_ptr;
|
||||
int index = 0;
|
||||
char *real_header_name = NULL;
|
||||
|
||||
if ((index_ptr = strchr(header_name, '['))) {
|
||||
index_ptr++;
|
||||
index = atoi(index_ptr);
|
||||
real_header_name = DUP(header_name);
|
||||
if ((index_ptr = strchr(real_header_name, '['))) {
|
||||
*index_ptr++ = '\0';
|
||||
}
|
||||
header_name = real_header_name;
|
||||
}
|
||||
|
||||
if (index_ptr || (stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
|
||||
|
||||
if (!(header = esl_event_get_header_ptr(event, header_name)) && index_ptr) {
|
||||
|
||||
header = new_header(header_name);
|
||||
|
||||
if (esl_test_flag(event, ESL_EF_UNIQ_HEADERS)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
}
|
||||
|
||||
fly++;
|
||||
}
|
||||
|
||||
if ((header = esl_event_get_header_ptr(event, header_name))) {
|
||||
|
||||
if (index_ptr) {
|
||||
if (index > -1 && index <= 4000) {
|
||||
if (index < header->idx) {
|
||||
FREE(header->array[index]);
|
||||
header->array[index] = DUP(data);
|
||||
} else {
|
||||
int i;
|
||||
char **m;
|
||||
|
||||
m = realloc(header->array, sizeof(char *) * (index + 1));
|
||||
esl_assert(m);
|
||||
header->array = m;
|
||||
for (i = header->idx; i < index; i++) {
|
||||
m[i] = DUP("");
|
||||
}
|
||||
m[index] = DUP(data);
|
||||
header->idx = index + 1;
|
||||
if (!fly) {
|
||||
exists = 1;
|
||||
}
|
||||
|
||||
goto redraw;
|
||||
}
|
||||
}
|
||||
goto end;
|
||||
} else {
|
||||
if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
|
||||
exists++;
|
||||
stack &= ~(ESL_STACK_TOP | ESL_STACK_BOTTOM);
|
||||
} else {
|
||||
header = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!header) {
|
||||
|
||||
if (esl_strlen_zero(data)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
FREE(data);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (esl_test_flag(event, ESL_EF_UNIQ_HEADERS)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
}
|
||||
|
||||
if (strstr(data, "ARRAY::")) {
|
||||
esl_event_add_array(event, header_name, data);
|
||||
FREE(data);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
header = new_header(header_name);
|
||||
}
|
||||
|
||||
if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
|
||||
char **m = NULL;
|
||||
esl_size_t len = 0;
|
||||
char *hv;
|
||||
int i = 0, j = 0;
|
||||
|
||||
if (header->value && !header->idx) {
|
||||
m = malloc(sizeof(char *));
|
||||
esl_assert(m);
|
||||
m[0] = header->value;
|
||||
header->value = NULL;
|
||||
header->array = m;
|
||||
header->idx++;
|
||||
m = NULL;
|
||||
}
|
||||
|
||||
i = header->idx + 1;
|
||||
m = realloc(header->array, sizeof(char *) * i);
|
||||
esl_assert(m);
|
||||
|
||||
if ((stack & ESL_STACK_PUSH)) {
|
||||
m[header->idx] = data;
|
||||
} else if ((stack & ESL_STACK_UNSHIFT)) {
|
||||
for (j = header->idx; j > 0; j--) {
|
||||
m[j] = m[j-1];
|
||||
}
|
||||
m[0] = data;
|
||||
}
|
||||
|
||||
header->idx++;
|
||||
header->array = m;
|
||||
|
||||
redraw:
|
||||
len = 0;
|
||||
for(j = 0; j < header->idx; j++) {
|
||||
len += strlen(header->array[j]) + 2;
|
||||
}
|
||||
|
||||
if (len) {
|
||||
len += 8;
|
||||
hv = realloc(header->value, len);
|
||||
esl_assert(hv);
|
||||
header->value = hv;
|
||||
|
||||
esl_snprintf(header->value, len, "ARRAY::");
|
||||
for(j = 0; j < header->idx; j++) {
|
||||
esl_snprintf(header->value + strlen(header->value), len - strlen(header->value), "%s%s", j == 0 ? "" : "|:", header->array[j]);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
header->value = data;
|
||||
}
|
||||
|
||||
if (!exists) {
|
||||
header->hash = esl_ci_hashfunc_default(header->name, &hlen);
|
||||
|
||||
if ((stack & ESL_STACK_TOP)) {
|
||||
header->next = event->headers;
|
||||
event->headers = header;
|
||||
if (!event->last_header) {
|
||||
event->last_header = header;
|
||||
}
|
||||
} else {
|
||||
if (event->last_header) {
|
||||
event->last_header->next = header;
|
||||
} else {
|
||||
event->headers = header;
|
||||
header->next = NULL;
|
||||
}
|
||||
event->last_header = header;
|
||||
}
|
||||
} else {
|
||||
if (event->last_header) {
|
||||
event->last_header->next = header;
|
||||
} else {
|
||||
event->headers = header;
|
||||
header->next = NULL;
|
||||
}
|
||||
event->last_header = header;
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
esl_safe_free(real_header_name);
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -386,48 +628,98 @@ ESL_DECLARE(esl_status_t) esl_event_add_body(esl_event_t *event, const char *fmt
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
ESL_DECLARE(void) esl_event_destroy(esl_event_t **event)
|
||||
{
|
||||
esl_event_t *ep = *event, *this_event;
|
||||
esl_event_header_t *hp, *this_header;
|
||||
esl_event_t *ep = *event;
|
||||
esl_event_header_t *hp, *this;
|
||||
|
||||
for (ep = *event ; ep ;) {
|
||||
this_event = ep;
|
||||
ep = ep->next;
|
||||
|
||||
for (hp = this_event->headers; hp;) {
|
||||
this_header = hp;
|
||||
if (ep) {
|
||||
for (hp = ep->headers; hp;) {
|
||||
this = hp;
|
||||
hp = hp->next;
|
||||
FREE(this_header->name);
|
||||
FREE(this_header->value);
|
||||
memset(this_header, 0, sizeof(*this_header));
|
||||
FREE(this_header);
|
||||
FREE(this->name);
|
||||
|
||||
if (this->idx) {
|
||||
int i = 0;
|
||||
this->value = NULL;
|
||||
for (i = 0; i < this->idx; i++) {
|
||||
FREE(this->array[i]);
|
||||
}
|
||||
FREE(this->array);
|
||||
}
|
||||
|
||||
FREE(this->value);
|
||||
|
||||
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
if (esl_queue_trypush(EVENT_HEADER_RECYCLE_QUEUE, this) != ESL_SUCCESS) {
|
||||
FREE(this);
|
||||
}
|
||||
#else
|
||||
FREE(this);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
FREE(this_event->body);
|
||||
FREE(this_event->subclass_name);
|
||||
memset(this_event, 0, sizeof(*this_event));
|
||||
FREE(this_event);
|
||||
FREE(ep->body);
|
||||
FREE(ep->subclass_name);
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
if (esl_queue_trypush(EVENT_RECYCLE_QUEUE, ep) != ESL_SUCCESS) {
|
||||
FREE(ep);
|
||||
}
|
||||
#else
|
||||
FREE(ep);
|
||||
#endif
|
||||
|
||||
}
|
||||
*event = NULL;
|
||||
}
|
||||
|
||||
ESL_DECLARE(void) esl_event_merge(esl_event_t *event, esl_event_t *tomerge)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
|
||||
esl_assert(tomerge && event);
|
||||
|
||||
for (hp = tomerge->headers; hp; hp = hp->next) {
|
||||
if (hp->idx) {
|
||||
int i;
|
||||
|
||||
for(i = 0; i < hp->idx; i++) {
|
||||
esl_event_add_header_string(event, ESL_STACK_PUSH, hp->name, hp->array[i]);
|
||||
}
|
||||
} else {
|
||||
esl_event_add_header_string(event, ESL_STACK_BOTTOM, hp->name, hp->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
|
||||
if (esl_event_create_subclass(event, ESL_EVENT_CLONE, todup->subclass_name) != ESL_SUCCESS) {
|
||||
return ESL_FAIL;
|
||||
return ESL_GENERR;
|
||||
}
|
||||
|
||||
(*event)->event_id = todup->event_id;
|
||||
|
||||
(*event)->event_user_data = todup->event_user_data;
|
||||
(*event)->bind_user_data = todup->bind_user_data;
|
||||
|
||||
(*event)->flags = todup->flags;
|
||||
for (hp = todup->headers; hp; hp = hp->next) {
|
||||
esl_event_add_header_string(*event, ESL_STACK_BOTTOM, hp->name, hp->value);
|
||||
if (todup->subclass_name && !strcmp(hp->name, "Event-Subclass")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hp->idx) {
|
||||
int i;
|
||||
for (i = 0; i < hp->idx; i++) {
|
||||
esl_event_add_header_string(*event, ESL_STACK_PUSH, hp->name, hp->array[i]);
|
||||
}
|
||||
} else {
|
||||
esl_event_add_header_string(*event, ESL_STACK_BOTTOM, hp->name, hp->value);
|
||||
}
|
||||
}
|
||||
|
||||
if (todup->body) {
|
||||
|
@ -439,97 +731,26 @@ ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
|
|||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char *json)
|
||||
{
|
||||
esl_event_t *new_event;
|
||||
cJSON *cj, *cjp;
|
||||
|
||||
|
||||
if (!(cj = cJSON_Parse(json))) {
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
if (esl_event_create(&new_event, ESL_EVENT_CLONE) != ESL_SUCCESS) {
|
||||
cJSON_Delete(cj);
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
for (cjp = cj->child; cjp; cjp = cjp->next) {
|
||||
char *name = cjp->string;
|
||||
char *value = cjp->valuestring;
|
||||
|
||||
if (name && value) {
|
||||
if (!strcasecmp(name, "_body")) {
|
||||
esl_event_add_body(new_event, value);
|
||||
} else {
|
||||
if (!strcasecmp(name, "event-name")) {
|
||||
esl_event_del_header(new_event, "event-name");
|
||||
}
|
||||
|
||||
esl_name_event(value, &new_event->event_id);
|
||||
esl_event_add_header_string(new_event, ESL_STACK_BOTTOM, name, value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
cJSON_Delete(cj);
|
||||
*event = new_event;
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_serialize_json(esl_event_t *event, char **str)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
cJSON *cj;
|
||||
|
||||
*str = NULL;
|
||||
|
||||
cj = cJSON_CreateObject();
|
||||
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
cJSON_AddItemToObject(cj, hp->name, cJSON_CreateString(hp->value));
|
||||
}
|
||||
if (event->body) {
|
||||
int blen = (int) strlen(event->body);
|
||||
char tmp[25];
|
||||
|
||||
esl_snprintf(tmp, sizeof(tmp), "%d", blen);
|
||||
|
||||
cJSON_AddItemToObject(cj, "Content-Length", cJSON_CreateString(tmp));
|
||||
cJSON_AddItemToObject(cj, "_body", cJSON_CreateString(event->body));
|
||||
}
|
||||
|
||||
*str = cJSON_Print(cj);
|
||||
cJSON_Delete(cj);
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, esl_bool_t encode)
|
||||
{
|
||||
size_t len = 0;
|
||||
esl_size_t len = 0;
|
||||
esl_event_header_t *hp;
|
||||
size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1536, new_len = 0;
|
||||
esl_size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1536, new_len = 0;
|
||||
char *buf;
|
||||
char *encode_buf = NULL; /* used for url encoding of variables to make sure unsafe things stay out of the serialized copy */
|
||||
int clen = 0;
|
||||
|
||||
if (!event || !event->headers)
|
||||
return ESL_FAIL;
|
||||
|
||||
*str = NULL;
|
||||
|
||||
dlen = blocksize * 2;
|
||||
|
||||
if (!(buf = malloc(dlen))) {
|
||||
return ESL_FAIL;
|
||||
abort();
|
||||
}
|
||||
|
||||
/* go ahead and give ourselves some space to work with, should save a few reallocs */
|
||||
if (!(encode_buf = malloc(encode_len))) {
|
||||
esl_safe_free(buf);
|
||||
return ESL_FAIL;
|
||||
abort();
|
||||
}
|
||||
|
||||
/* esl_log_printf(ESL_CHANNEL_LOG, ESL_LOG_INFO, "hit serialized!.\n"); */
|
||||
|
@ -542,54 +763,54 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
|
|||
* destroying loop.
|
||||
*/
|
||||
|
||||
if (!strcasecmp(hp->name, "content-length")) {
|
||||
clen++;
|
||||
if (hp->idx) {
|
||||
int i;
|
||||
new_len = 0;
|
||||
for(i = 0; i < hp->idx; i++) {
|
||||
new_len += (strlen(hp->array[i]) * 3) + 1;
|
||||
}
|
||||
} else {
|
||||
new_len = (strlen(hp->value) * 3) + 1;
|
||||
}
|
||||
|
||||
|
||||
new_len = (strlen(hp->value) * 3) + 1;
|
||||
|
||||
if (encode_len < new_len) {
|
||||
char *tmp;
|
||||
/* esl_log_printf(ESL_CHANNEL_LOG, ESL_LOG_INFO, "Allocing %d was %d.\n", ((strlen(hp->value) * 3) + 1), encode_len); */
|
||||
/* we can use realloc for initial alloc as well, if encode_buf is zero it treats it as a malloc */
|
||||
|
||||
/* keep track of the size of our allocation */
|
||||
encode_len = new_len;
|
||||
|
||||
if (!(tmp = realloc(encode_buf, encode_len))) {
|
||||
/* oh boy, ram's gone, give back what little we grabbed and bail */
|
||||
esl_safe_free(buf);
|
||||
esl_safe_free(encode_buf);
|
||||
return ESL_FAIL;
|
||||
abort();
|
||||
}
|
||||
|
||||
encode_buf = tmp;
|
||||
}
|
||||
|
||||
/* handle any bad things in the string like newlines : etc that screw up the serialized format */
|
||||
|
||||
|
||||
if (encode) {
|
||||
esl_url_encode(hp->value, encode_buf, encode_len);
|
||||
} else {
|
||||
esl_snprintf(encode_buf, encode_len, "%s", hp->value);
|
||||
esl_snprintf(encode_buf, encode_len, "[%s]", hp->value);
|
||||
}
|
||||
|
||||
|
||||
llen = strlen(hp->name) + strlen(encode_buf) + 8;
|
||||
|
||||
if ((len + llen) > dlen) {
|
||||
char *m;
|
||||
char *old = buf;
|
||||
dlen += (blocksize + (len + llen));
|
||||
if ((m = realloc(buf, dlen))) {
|
||||
buf = m;
|
||||
} else {
|
||||
/* we seem to be out of memory trying to resize the serialize string, give back what we already have and give up */
|
||||
esl_safe_free(buf);
|
||||
esl_safe_free(encode_buf);
|
||||
return ESL_FAIL;
|
||||
buf = old;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, *encode_buf == '\0' ? "_undef_" : encode_buf);
|
||||
esl_snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, *encode_buf == '\0' ? "_undef_" : encode_buf);
|
||||
len = strlen(buf);
|
||||
}
|
||||
|
||||
|
@ -608,33 +829,121 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
|
|||
|
||||
if ((len + llen) > dlen) {
|
||||
char *m;
|
||||
char *old = buf;
|
||||
dlen += (blocksize + (len + llen));
|
||||
if ((m = realloc(buf, dlen))) {
|
||||
buf = m;
|
||||
} else {
|
||||
esl_safe_free(buf);
|
||||
return ESL_FAIL;
|
||||
buf = old;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (blen) {
|
||||
if (clen) {
|
||||
snprintf(buf + len, dlen - len, "\n%s", event->body);
|
||||
} else {
|
||||
snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", (int)strlen(event->body), event->body);
|
||||
|
||||
}
|
||||
esl_snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", blen, event->body);
|
||||
} else {
|
||||
esl_snprintf(buf + len, dlen - len, "\n");
|
||||
}
|
||||
} else {
|
||||
snprintf(buf + len, dlen - len, "\n");
|
||||
esl_snprintf(buf + len, dlen - len, "\n");
|
||||
}
|
||||
|
||||
|
||||
*str = buf;
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char *json)
|
||||
{
|
||||
esl_event_t *new_event;
|
||||
cJSON *cj, *cjp;
|
||||
|
||||
|
||||
if (!(cj = cJSON_Parse(json))) {
|
||||
return ESL_FALSE;
|
||||
}
|
||||
|
||||
if (esl_event_create(&new_event, ESL_EVENT_CLONE) != ESL_SUCCESS) {
|
||||
cJSON_Delete(cj);
|
||||
return ESL_FALSE;
|
||||
}
|
||||
|
||||
for (cjp = cj->child; cjp; cjp = cjp->next) {
|
||||
char *name = cjp->string;
|
||||
char *value = cjp->valuestring;
|
||||
|
||||
if (name && value) {
|
||||
if (!strcasecmp(name, "_body")) {
|
||||
esl_event_add_body(new_event, value, ESL_VA_NONE);
|
||||
} else {
|
||||
if (!strcasecmp(name, "event-name")) {
|
||||
esl_event_del_header(new_event, "event-name");
|
||||
esl_name_event(value, &new_event->event_id);
|
||||
}
|
||||
|
||||
esl_event_add_header_string(new_event, ESL_STACK_BOTTOM, name, value);
|
||||
}
|
||||
|
||||
} else if (name) {
|
||||
if (cjp->type == cJSON_Array) {
|
||||
int i, x = cJSON_GetArraySize(cjp);
|
||||
|
||||
for (i = 0; i < x; i++) {
|
||||
cJSON *item = cJSON_GetArrayItem(cjp, i);
|
||||
|
||||
if (item != NULL && item->type == cJSON_String && item->valuestring) {
|
||||
esl_event_add_header_string(new_event, ESL_STACK_PUSH, name, item->valuestring);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cJSON_Delete(cj);
|
||||
*event = new_event;
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_serialize_json(esl_event_t *event, char **str)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
cJSON *cj;
|
||||
|
||||
*str = NULL;
|
||||
|
||||
cj = cJSON_CreateObject();
|
||||
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
if (hp->idx) {
|
||||
cJSON *a = cJSON_CreateArray();
|
||||
int i;
|
||||
|
||||
for(i = 0; i < hp->idx; i++) {
|
||||
cJSON_AddItemToArray(a, cJSON_CreateString(hp->array[i]));
|
||||
}
|
||||
|
||||
cJSON_AddItemToObject(cj, hp->name, a);
|
||||
|
||||
} else {
|
||||
cJSON_AddItemToObject(cj, hp->name, cJSON_CreateString(hp->value));
|
||||
}
|
||||
}
|
||||
|
||||
if (event->body) {
|
||||
int blen = (int) strlen(event->body);
|
||||
char tmp[25];
|
||||
|
||||
esl_snprintf(tmp, sizeof(tmp), "%d", blen);
|
||||
|
||||
cJSON_AddItemToObject(cj, "Content-Length", cJSON_CreateString(tmp));
|
||||
cJSON_AddItemToObject(cj, "_body", cJSON_CreateString(event->body));
|
||||
}
|
||||
|
||||
*str = cJSON_Print(cj);
|
||||
cJSON_Delete(cj);
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
|
|
@ -390,12 +390,12 @@ bool ESLevent::setPriority(esl_priority_t priority)
|
|||
return false;
|
||||
}
|
||||
|
||||
const char *ESLevent::getHeader(const char *header_name)
|
||||
const char *ESLevent::getHeader(const char *header_name, int idx)
|
||||
{
|
||||
this_check("");
|
||||
|
||||
if (event) {
|
||||
return esl_event_get_header(event, header_name);
|
||||
return esl_event_get_header_idx(event, header_name, idx);
|
||||
} else {
|
||||
esl_log(ESL_LOG_ERROR, "Trying to getHeader an event that does not exist!\n");
|
||||
}
|
||||
|
@ -415,6 +415,32 @@ bool ESLevent::addHeader(const char *header_name, const char *value)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ESLevent::pushHeader(const char *header_name, const char *value)
|
||||
{
|
||||
this_check(false);
|
||||
|
||||
if (event) {
|
||||
return esl_event_add_header_string(event, ESL_STACK_PUSH, header_name, value) == ESL_SUCCESS ? true : false;
|
||||
} else {
|
||||
esl_log(ESL_LOG_ERROR, "Trying to addHeader an event that does not exist!\n");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ESLevent::unshiftHeader(const char *header_name, const char *value)
|
||||
{
|
||||
this_check(false);
|
||||
|
||||
if (event) {
|
||||
return esl_event_add_header_string(event, ESL_STACK_UNSHIFT, header_name, value) == ESL_SUCCESS ? true : false;
|
||||
} else {
|
||||
esl_log(ESL_LOG_ERROR, "Trying to addHeader an event that does not exist!\n");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ESLevent::delHeader(const char *header_name)
|
||||
{
|
||||
this_check(false);
|
||||
|
|
|
@ -42,6 +42,7 @@ extern "C" {
|
|||
|
||||
#define esl_copy_string(_x, _y, _z) strncpy(_x, _y, _z - 1)
|
||||
#define esl_set_string(_x, _y) esl_copy_string(_x, _y, sizeof(_x))
|
||||
#define ESL_VA_NONE "%s", ""
|
||||
|
||||
typedef struct esl_event_header esl_event_header_t;
|
||||
typedef struct esl_event esl_event_t;
|
||||
|
@ -262,7 +263,8 @@ typedef enum {
|
|||
ESL_SUCCESS,
|
||||
ESL_FAIL,
|
||||
ESL_BREAK,
|
||||
ESL_DISCONNECTED
|
||||
ESL_DISCONNECTED,
|
||||
ESL_GENERR
|
||||
} esl_status_t;
|
||||
|
||||
#define BUF_CHUNK 65536 * 50
|
||||
|
@ -309,6 +311,10 @@ typedef struct {
|
|||
int destroyed;
|
||||
} esl_handle_t;
|
||||
|
||||
#define esl_test_flag(obj, flag) ((obj)->flags & flag)
|
||||
#define esl_set_flag(obj, flag) (obj)->flags |= (flag)
|
||||
#define esl_clear_flag(obj, flag) (obj)->flags &= ~(flag)
|
||||
|
||||
/*! \brief Used internally for truth test */
|
||||
typedef enum {
|
||||
ESL_TRUE = 1,
|
||||
|
@ -453,6 +459,8 @@ ESL_DECLARE(esl_status_t) esl_events(esl_handle_t *handle, esl_event_type_t etyp
|
|||
|
||||
ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags);
|
||||
|
||||
ESL_DECLARE(unsigned int) esl_separate_string_string(char *buf, const char *delim, char **array, unsigned int arraylen);
|
||||
|
||||
#define esl_recv(_h) esl_recv_event(_h, 0, NULL)
|
||||
#define esl_recv_timed(_h, _ms) esl_recv_event_timed(_h, _ms, 0, NULL)
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ extern "C" {
|
|||
|
||||
typedef enum {
|
||||
ESL_STACK_BOTTOM,
|
||||
ESL_STACK_TOP
|
||||
ESL_STACK_TOP,
|
||||
ESL_STACK_PUSH,
|
||||
ESL_STACK_UNSHIFT
|
||||
} esl_stack_t;
|
||||
|
||||
typedef enum {
|
||||
|
@ -141,6 +143,10 @@ typedef enum {
|
|||
char *name;
|
||||
/*! the header value */
|
||||
char *value;
|
||||
/*! array space */
|
||||
char **array;
|
||||
/*! array index */
|
||||
int idx;
|
||||
/*! hash of the header name */
|
||||
unsigned long hash;
|
||||
struct esl_event_header *next;
|
||||
|
@ -174,7 +180,7 @@ struct esl_event {
|
|||
};
|
||||
|
||||
typedef enum {
|
||||
ESL_UNIQ_HEADERS = (1 << 0)
|
||||
ESL_EF_UNIQ_HEADERS = (1 << 0)
|
||||
} esl_event_flag_t;
|
||||
|
||||
|
||||
|
@ -203,7 +209,11 @@ ESL_DECLARE(esl_status_t) esl_event_set_priority(esl_event_t *event, esl_priorit
|
|||
\param header_name the name of the header to read
|
||||
\return the value of the requested header
|
||||
*/
|
||||
ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_name);
|
||||
|
||||
|
||||
ESL_DECLARE(esl_event_header_t *) esl_event_get_header_ptr(esl_event_t *event, const char *header_name);
|
||||
ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *header_name, int idx);
|
||||
#define esl_event_get_header(_e, _h) esl_event_get_header_idx(_e, _h, -1)
|
||||
|
||||
/*!
|
||||
\brief Retrieve the body value from an event
|
||||
|
@ -223,6 +233,8 @@ ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event);
|
|||
ESL_DECLARE(esl_status_t) esl_event_add_header(esl_event_t *event, esl_stack_t stack,
|
||||
const char *header_name, const char *fmt, ...); //PRINTF_FUNCTION(4, 5);
|
||||
|
||||
ESL_DECLARE(int) esl_event_add_array(esl_event_t *event, const char *var, const char *val);
|
||||
|
||||
/*!
|
||||
\brief Add a string header to an event
|
||||
\param event the event to add the header to
|
||||
|
@ -250,6 +262,7 @@ ESL_DECLARE(void) esl_event_destroy(esl_event_t **event);
|
|||
\return ESL_SUCCESS if the event was duplicated
|
||||
*/
|
||||
ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup);
|
||||
ESL_DECLARE(void) esl_event_merge(esl_event_t *event, esl_event_t *tomerge);
|
||||
|
||||
/*!
|
||||
\brief Render the name of an event id enumeration
|
||||
|
|
|
@ -56,11 +56,13 @@ class ESLevent {
|
|||
virtual ~ESLevent();
|
||||
const char *serialize(const char *format = NULL);
|
||||
bool setPriority(esl_priority_t priority = ESL_PRIORITY_NORMAL);
|
||||
const char *getHeader(const char *header_name);
|
||||
const char *getHeader(const char *header_name, int idx = -1);
|
||||
char *getBody(void);
|
||||
const char *getType(void);
|
||||
bool addBody(const char *value);
|
||||
bool addHeader(const char *header_name, const char *value);
|
||||
bool pushHeader(const char *header_name, const char *value);
|
||||
bool unshiftHeader(const char *header_name, const char *value);
|
||||
bool delHeader(const char *header_name);
|
||||
const char *firstHeader(void);
|
||||
const char *nextHeader(void);
|
||||
|
|
|
@ -90,7 +90,7 @@ library_include_HEADERS = \
|
|||
$(SRC)/include/ftdm_dso.h
|
||||
|
||||
lib_LTLIBRARIES = libfreetdm.la
|
||||
libfreetdm_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
libfreetdm_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
libfreetdm_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
|
||||
libfreetdm_la_LIBADD = $(LIBS)
|
||||
|
||||
|
@ -104,39 +104,39 @@ noinst_PROGRAMS = testtones detect_tones detect_dtmf testpri testr2 testanalog
|
|||
|
||||
testapp_SOURCES = $(SRC)/testapp.c
|
||||
testapp_LDADD = libfreetdm.la
|
||||
testapp_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testapp_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testcid_SOURCES = $(SRC)/testcid.c
|
||||
testcid_LDADD = libfreetdm.la
|
||||
testcid_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testcid_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testtones_SOURCES = $(SRC)/testtones.c
|
||||
testtones_LDADD = libfreetdm.la
|
||||
testtones_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testtones_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
detect_tones_SOURCES = $(SRC)/detect_tones.c
|
||||
detect_tones_LDADD = libfreetdm.la
|
||||
detect_tones_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
detect_tones_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
detect_dtmf_SOURCES = $(SRC)/detect_dtmf.c
|
||||
detect_dtmf_LDADD = libfreetdm.la
|
||||
detect_dtmf_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
detect_dtmf_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
#testisdn_SOURCES = $(SRC)/testisdn.c
|
||||
#testisdn_LDADD = libfreetdm.la
|
||||
#testisdn_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
#testisdn_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testpri_SOURCES = $(SRC)/testpri.c
|
||||
testpri_LDADD = libfreetdm.la
|
||||
testpri_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testpri_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testr2_SOURCES = $(SRC)/testr2.c
|
||||
testr2_LDADD = libfreetdm.la
|
||||
testr2_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testr2_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testanalog_SOURCES = $(SRC)/testanalog.c
|
||||
testanalog_LDADD = libfreetdm.la
|
||||
testanalog_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testanalog_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
#
|
||||
# ftmod modules
|
||||
|
@ -144,22 +144,22 @@ testanalog_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
|||
mod_LTLIBRARIES = ftmod_zt.la ftmod_skel.la ftmod_analog.la ftmod_analog_em.la
|
||||
|
||||
ftmod_zt_la_SOURCES = $(SRC)/ftmod/ftmod_zt/ftmod_zt.c
|
||||
ftmod_zt_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_zt_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_zt_la_LDFLAGS = -shared -module -avoid-version
|
||||
ftmod_zt_la_LIBADD = libfreetdm.la
|
||||
|
||||
ftmod_skel_la_SOURCES = $(SRC)/ftmod/ftmod_skel/ftmod_skel.c
|
||||
ftmod_skel_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_skel_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_skel_la_LDFLAGS = -module -avoid-version
|
||||
ftmod_skel_la_LIBADD = libfreetdm.la
|
||||
|
||||
ftmod_analog_la_SOURCES = $(SRC)/ftmod/ftmod_analog/ftmod_analog.c
|
||||
ftmod_analog_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_analog_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_analog_la_LDFLAGS = -shared -module -avoid-version
|
||||
ftmod_analog_la_LIBADD = libfreetdm.la
|
||||
|
||||
ftmod_analog_em_la_SOURCES = $(SRC)/ftmod/ftmod_analog_em/ftmod_analog_em.c
|
||||
ftmod_analog_em_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_analog_em_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_analog_em_la_LDFLAGS = -shared -module -avoid-version
|
||||
ftmod_analog_em_la_LIBADD = libfreetdm.la
|
||||
|
||||
|
@ -168,7 +168,7 @@ mod_LTLIBRARIES += ftmod_wanpipe.la
|
|||
ftmod_wanpipe_la_SOURCES = $(SRC)/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
|
||||
# some structures within Wanpipe drivers are not c99 compatible, so we need to compile ftmod_wanpipe
|
||||
# without c99 flags, use FTDM_COMPAT_CFLAGS instead
|
||||
ftmod_wanpipe_la_CFLAGS = $(AM_CFLAGS) $(FTDM_COMPAT_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe
|
||||
ftmod_wanpipe_la_CFLAGS = $(FTDM_COMPAT_CFLAGS) $(AM_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe
|
||||
ftmod_wanpipe_la_LDFLAGS = -shared -module -avoid-version -lsangoma
|
||||
ftmod_wanpipe_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
@ -176,7 +176,7 @@ endif
|
|||
if HAVE_LIBISDN
|
||||
mod_LTLIBRARIES += ftmod_isdn.la
|
||||
ftmod_isdn_la_SOURCES = $(SRC)/ftmod/ftmod_isdn/ftmod_isdn.c
|
||||
ftmod_isdn_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE $(LIBISDN_CPPFLAGS) $(PCAP_CPPFLAGS)
|
||||
ftmod_isdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE $(LIBISDN_CPPFLAGS) $(PCAP_CPPFLAGS)
|
||||
ftmod_isdn_la_LDFLAGS = -shared -module -avoid-version $(LIBISDN_LDFLAGS) $(PCAP_LDFLAGS)
|
||||
ftmod_isdn_la_LIBADD = libfreetdm.la $(LIBISDN_LIBS) $(PCAP_LIBS)
|
||||
endif
|
||||
|
@ -184,7 +184,7 @@ endif
|
|||
if HAVE_LIBPRI
|
||||
mod_LTLIBRARIES += ftmod_libpri.la
|
||||
ftmod_libpri_la_SOURCES = $(SRC)/ftmod/ftmod_libpri/ftmod_libpri.c $(SRC)/ftmod/ftmod_libpri/lpwrap_pri.c
|
||||
ftmod_libpri_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_libpri_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_libpri_la_LDFLAGS = -shared -module -avoid-version -lpri
|
||||
ftmod_libpri_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
@ -192,7 +192,7 @@ endif
|
|||
if HAVE_PRITAP
|
||||
mod_LTLIBRARIES += ftmod_pritap.la
|
||||
ftmod_pritap_la_SOURCES = $(SRC)/ftmod/ftmod_pritap/ftmod_pritap.c
|
||||
ftmod_pritap_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_pritap_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_pritap_la_LDFLAGS = -shared -module -avoid-version -lpri
|
||||
ftmod_pritap_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
@ -215,7 +215,7 @@ ftmod_sangoma_ss7_la_SOURCES = \
|
|||
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c \
|
||||
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c
|
||||
|
||||
ftmod_sangoma_ss7_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_ss7_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_ss7_la_LDFLAGS = -shared -module -avoid-version -lsng_ss7
|
||||
ftmod_sangoma_ss7_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
@ -235,7 +235,7 @@ ftmod_sangoma_isdn_la_SOURCES = \
|
|||
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c \
|
||||
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c
|
||||
|
||||
ftmod_sangoma_isdn_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_isdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_isdn_la_LDFLAGS = -shared -module -avoid-version -lsng_isdn
|
||||
ftmod_sangoma_isdn_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
@ -243,7 +243,7 @@ endif
|
|||
if HAVE_OPENR2
|
||||
mod_LTLIBRARIES += ftmod_r2.la
|
||||
ftmod_r2_la_SOURCES = $(SRC)/ftmod/ftmod_r2/ftmod_r2.c $(SRC)/ftmod/ftmod_r2/ftmod_r2_io_mf_lib.c
|
||||
ftmod_r2_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_r2_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_r2_la_LDFLAGS = -shared -module -avoid-version -lopenr2
|
||||
ftmod_r2_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
#define FREETDM_VAR_PREFIX "freetdm_"
|
||||
#define FREETDM_VAR_PREFIX_LEN (sizeof(FREETDM_VAR_PREFIX)-1)
|
||||
|
||||
/* How many consecutive IO errors before giving up */
|
||||
#define FTDM_MAX_READ_WRITE_ERRORS 10
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_freetdm_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_freetdm_shutdown);
|
||||
SWITCH_MODULE_DEFINITION(mod_freetdm, mod_freetdm_load, mod_freetdm_shutdown, NULL);
|
||||
|
@ -110,7 +113,8 @@ struct private_object {
|
|||
switch_mutex_t *mutex;
|
||||
switch_mutex_t *flag_mutex;
|
||||
ftdm_channel_t *ftdmchan;
|
||||
uint32_t wr_error;
|
||||
uint32_t write_error;
|
||||
uint32_t read_error;
|
||||
};
|
||||
|
||||
/* private data attached to FTDM channels (only FXS for now) */
|
||||
|
@ -624,12 +628,11 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||
ftdm_status_t status;
|
||||
int total_to;
|
||||
int chunk, do_break = 0;
|
||||
|
||||
uint32_t span_id, chan_id;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
|
@ -638,6 +641,13 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (!tech_pvt->ftdmchan) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
|
||||
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
|
||||
|
||||
/* Digium Cards sometimes timeout several times in a row here.
|
||||
Yes, we support digium cards, ain't we nice.......
|
||||
6 double length intervals should compensate */
|
||||
|
@ -697,8 +707,13 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||
|
||||
len = tech_pvt->read_frame.buflen;
|
||||
if (ftdm_channel_read(tech_pvt->ftdmchan, tech_pvt->read_frame.data, &len) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_WARNING, "failed to read from device\n");
|
||||
goto fail;
|
||||
ftdm_log(FTDM_LOG_WARNING, "failed to read from device %d:%d\n", span_id, chan_id);
|
||||
if (++tech_pvt->read_error > FTDM_MAX_READ_WRITE_ERRORS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "too many I/O read errors on device %d:%d!\n", span_id, chan_id);
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
tech_pvt->read_error = 0;
|
||||
}
|
||||
|
||||
*frame = &tech_pvt->read_frame;
|
||||
|
@ -736,6 +751,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||
ftdm_size_t len;
|
||||
unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
|
||||
ftdm_wait_flag_t wflags = FTDM_WRITE;
|
||||
uint32_t span_id, chan_id;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
@ -743,10 +759,6 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
if (!tech_pvt->ftdmchan) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (switch_test_flag(tech_pvt, TFLAG_DEAD)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@ -758,6 +770,14 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!tech_pvt->ftdmchan) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
|
||||
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
|
||||
|
||||
|
||||
if (switch_test_flag(frame, SFF_CNG)) {
|
||||
frame->data = data;
|
||||
|
@ -779,12 +799,14 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||
|
||||
len = frame->datalen;
|
||||
if (ftdm_channel_write(tech_pvt->ftdmchan, frame->data, frame->buflen, &len) != FTDM_SUCCESS) {
|
||||
if (++tech_pvt->wr_error > 10) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "too many I/O write errors!\n");
|
||||
ftdm_log(FTDM_LOG_WARNING, "failed to write to device %d:%d\n", span_id, chan_id);
|
||||
if (++tech_pvt->write_error > FTDM_MAX_READ_WRITE_ERRORS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG,
|
||||
SWITCH_LOG_ERROR, "too many I/O write errors on device %d:%d!\n", span_id, chan_id);
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
tech_pvt->wr_error = 0;
|
||||
tech_pvt->write_error = 0;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -1855,29 +1877,31 @@ static FIO_SIGNAL_CB_FUNCTION(on_common_signal)
|
|||
break;
|
||||
}
|
||||
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-name", "%s", ftdm_channel_get_span_name(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-number", "%d", ftdm_channel_get_span_id(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "chan-number", "%d", ftdm_channel_get_id(sigmsg->channel));
|
||||
if (event) {
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-name", "%s", ftdm_channel_get_span_name(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-number", "%d", ftdm_channel_get_span_id(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "chan-number", "%d", ftdm_channel_get_id(sigmsg->channel));
|
||||
|
||||
if (alarmbits & FTDM_ALARM_RED) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "red");
|
||||
if (alarmbits & FTDM_ALARM_RED) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "red");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_YELLOW) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "yellow");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_RAI) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "rai");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_BLUE) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "blue");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_AIS) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "ais");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_GENERAL) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "general");
|
||||
}
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_YELLOW) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "yellow");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_RAI) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "rai");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_BLUE) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "blue");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_AIS) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "ais");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_GENERAL) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "general");
|
||||
}
|
||||
switch_event_fire(&event);
|
||||
|
||||
return FTDM_BREAK;
|
||||
}
|
||||
|
@ -2483,10 +2507,10 @@ static uint32_t enable_analog_option(const char *str, uint32_t current_options)
|
|||
|
||||
}
|
||||
|
||||
#define CONFIG_ERROR(...) do { \
|
||||
#define CONFIG_ERROR(...) { \
|
||||
ftdm_log(FTDM_LOG_ERROR, __VA_ARGS__); \
|
||||
globals.config_error = 1; \
|
||||
} while(0)
|
||||
}
|
||||
/* create ftdm_conf_node_t tree based on a fixed pattern XML configuration list
|
||||
* last 2 args are for limited aka dumb recursivity
|
||||
* */
|
||||
|
@ -2871,9 +2895,9 @@ static switch_status_t load_config(void)
|
|||
} else if (!strcasecmp(var, "hold-music")) {
|
||||
switch_set_string(globals.hold_music, val);
|
||||
} else if (!strcasecmp(var, "crash-on-assert")) {
|
||||
globals.crash_on_assert = switch_true(val);
|
||||
globals.crash_on_assert = (uint8_t)switch_true(val);
|
||||
} else if (!strcasecmp(var, "fail-on-error")) {
|
||||
globals.fail_on_error = switch_true(val);
|
||||
globals.fail_on_error = (uint8_t)switch_true(val);
|
||||
} else if (!strcasecmp(var, "sip-headers")) {
|
||||
globals.sip_headers = switch_true(val);
|
||||
} else if (!strcasecmp(var, "enable-analog-option")) {
|
||||
|
|
|
@ -1549,6 +1549,7 @@ static ftdm_status_t _ftdm_channel_open_by_group(uint32_t group_id, ftdm_directi
|
|||
int best_rate = 0;
|
||||
uint32_t i = 0;
|
||||
uint32_t count = 0;
|
||||
uint32_t first_channel = 0;
|
||||
|
||||
if (group_id) {
|
||||
ftdm_group_find(group_id, &group);
|
||||
|
@ -1573,6 +1574,7 @@ static ftdm_status_t _ftdm_channel_open_by_group(uint32_t group_id, ftdm_directi
|
|||
i = 0;
|
||||
} else if (direction == FTDM_RR_DOWN || direction == FTDM_RR_UP) {
|
||||
i = rr_next(group->last_used_index, 0, group->chan_count - 1, direction);
|
||||
first_channel = i;
|
||||
} else {
|
||||
i = group->chan_count-1;
|
||||
}
|
||||
|
@ -1605,6 +1607,9 @@ static ftdm_status_t _ftdm_channel_open_by_group(uint32_t group_id, ftdm_directi
|
|||
group->last_used_index = i;
|
||||
}
|
||||
i = rr_next(i, 0, group->chan_count - 1, direction);
|
||||
if (first_channel == i) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (i == 0) {
|
||||
break;
|
||||
|
@ -1663,6 +1668,7 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
|||
int best_rate = 0;
|
||||
uint32_t i = 0;
|
||||
uint32_t count = 0;
|
||||
uint32_t first_channel = 0;
|
||||
|
||||
*ftdmchan = NULL;
|
||||
|
||||
|
@ -1696,6 +1702,7 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
|||
i = 1;
|
||||
} else if (direction == FTDM_RR_DOWN || direction == FTDM_RR_UP) {
|
||||
i = rr_next(span->last_used_index, 1, span->chan_count, direction);
|
||||
first_channel = i;
|
||||
} else {
|
||||
i = span->chan_count;
|
||||
}
|
||||
|
@ -1706,10 +1713,6 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
|||
if (i > span->chan_count) {
|
||||
break;
|
||||
}
|
||||
} else if (direction == FTDM_RR_DOWN || direction == FTDM_RR_UP) {
|
||||
if (i == span->last_used_index) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (i == 0) {
|
||||
break;
|
||||
|
@ -1738,6 +1741,9 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
|||
span->last_used_index = i;
|
||||
}
|
||||
i = rr_next(i, 1, span->chan_count, direction);
|
||||
if (first_channel == i) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
|
@ -3583,7 +3589,7 @@ skipdebug:
|
|||
return status;
|
||||
}
|
||||
|
||||
FIO_WRITE_FUNCTION(ftdm_raw_write)
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_write (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen)
|
||||
{
|
||||
int dlen = (int) *datalen;
|
||||
|
||||
|
@ -3610,7 +3616,7 @@ FIO_WRITE_FUNCTION(ftdm_raw_write)
|
|||
return ftdmchan->fio->write(ftdmchan, data, datalen);
|
||||
}
|
||||
|
||||
FIO_READ_FUNCTION(ftdm_raw_read)
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_read (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen)
|
||||
{
|
||||
ftdm_status_t status;
|
||||
|
||||
|
|
|
@ -1584,6 +1584,13 @@ static int on_dchan_down(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_
|
|||
static int on_anything(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_event *pevent)
|
||||
{
|
||||
ftdm_log(FTDM_LOG_DEBUG, "-- Caught Event span %d %u (%s)\n", ftdm_span_get_id(spri->span), event_type, lpwrap_pri_event_str(event_type));
|
||||
switch (pevent->e) {
|
||||
case PRI_EVENT_CONFIG_ERR:
|
||||
{
|
||||
ftdm_log(FTDM_LOG_WARNING, "-- PRI error event: %s\n", pevent->err.err);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -436,6 +436,13 @@ static __inline openr2_calling_party_category_t ftdm_r2_ftdm_cpc_to_openr2_cpc(f
|
|||
case FTDM_CPC_PAYPHONE:
|
||||
return OR2_CALLING_PARTY_CATEGORY_PAY_PHONE;
|
||||
|
||||
case FTDM_CPC_OPERATOR_FRENCH:
|
||||
case FTDM_CPC_OPERATOR_ENGLISH:
|
||||
case FTDM_CPC_OPERATOR_GERMAN:
|
||||
case FTDM_CPC_OPERATOR_RUSSIAN:
|
||||
case FTDM_CPC_OPERATOR_SPANISH:
|
||||
return OR2_CALLING_PARTY_CATEGORY_COLLECT_CALL;
|
||||
|
||||
case FTDM_CPC_INVALID:
|
||||
return OR2_CALLING_PARTY_CATEGORY_UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -238,6 +238,10 @@
|
|||
RelativePath=".\ftmod_sangoma_isdn_trace.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ftmod_sangoma_isdn_transfer.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
|
|
@ -189,6 +189,7 @@
|
|||
<ClCompile Include="ftmod_sangoma_isdn_stack_rcv.c" />
|
||||
<ClCompile Include="ftmod_sangoma_isdn_support.c" />
|
||||
<ClCompile Include="ftmod_sangoma_isdn_trace.c" />
|
||||
<ClCompile Include="ftmod_sangoma_isdn_transfer.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\msvc\freetdm.2010.vcxproj">
|
||||
|
@ -199,4 +200,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -47,7 +47,6 @@ static ftdm_status_t ftdm_sangoma_isdn_start(ftdm_span_t *span);
|
|||
static ftdm_status_t ftdm_sangoma_isdn_dtmf(ftdm_channel_t *ftdmchan, const char* dtmf);
|
||||
|
||||
ftdm_channel_t* ftdm_sangoma_isdn_process_event_states(ftdm_span_t *span, sngisdn_event_data_t *sngisdn_event);
|
||||
static void ftdm_sangoma_isdn_poll_events(ftdm_span_t *span);
|
||||
static void ftdm_sangoma_isdn_process_phy_events(ftdm_span_t *span, ftdm_oob_event_t event);
|
||||
static ftdm_status_t ftdm_sangoma_isdn_process_state_change(ftdm_channel_t *ftdmchan);
|
||||
static void ftdm_sangoma_isdn_process_stack_event (ftdm_span_t *span, sngisdn_event_data_t *sngisdn_event);
|
||||
|
@ -59,8 +58,8 @@ static sng_isdn_event_interface_t g_sngisdn_event_interface;
|
|||
|
||||
ftdm_sngisdn_data_t g_sngisdn_data;
|
||||
|
||||
FTDM_ENUM_NAMES(SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_TYPE_STRINGS)
|
||||
FTDM_STR2ENUM(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t, SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_INVALID)
|
||||
SNGISDN_ENUM_NAMES(SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_TYPE_STRINGS)
|
||||
SNGISDN_STR2ENUM(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t, SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_INVALID)
|
||||
|
||||
ftdm_state_map_t sangoma_isdn_state_map = {
|
||||
{
|
||||
|
@ -313,28 +312,6 @@ static void ftdm_sangoma_isdn_process_phy_events(ftdm_span_t *span, ftdm_oob_eve
|
|||
}
|
||||
}
|
||||
|
||||
static void ftdm_sangoma_isdn_poll_events(ftdm_span_t *span)
|
||||
{
|
||||
ftdm_status_t ret_status;
|
||||
|
||||
ret_status = ftdm_span_poll_event(span, 0, NULL);
|
||||
switch(ret_status) {
|
||||
case FTDM_SUCCESS:
|
||||
{
|
||||
ftdm_event_t *event;
|
||||
while (ftdm_span_next_event(span, &event) == FTDM_SUCCESS) {
|
||||
ftdm_sangoma_isdn_process_phy_events(span, event->enum_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case FTDM_TIMEOUT:
|
||||
/* No events pending */
|
||||
break;
|
||||
default:
|
||||
ftdm_log(FTDM_LOG_WARNING, "%s:Failed to poll span event\n", span->name);
|
||||
}
|
||||
}
|
||||
|
||||
static void ftdm_sangoma_isdn_dchan_set_queue_size(ftdm_channel_t *dchan)
|
||||
{
|
||||
ftdm_status_t ret_status;
|
||||
|
@ -365,7 +342,7 @@ static void ftdm_sangoma_isdn_wakeup_phy(ftdm_channel_t *dchan)
|
|||
static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
||||
{
|
||||
uint8_t data[1000];
|
||||
unsigned i;
|
||||
unsigned i = 0;
|
||||
ftdm_status_t status = FTDM_SUCCESS;
|
||||
ftdm_wait_flag_t wflags = FTDM_READ;
|
||||
ftdm_span_t *span = (ftdm_span_t*) obj;
|
||||
|
@ -374,6 +351,7 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
|||
unsigned waitms = 10000;
|
||||
ftdm_iterator_t *chaniter = NULL;
|
||||
ftdm_iterator_t *citer = NULL;
|
||||
ftdm_event_t *event;
|
||||
short *poll_events = ftdm_malloc(sizeof(short) * span->chan_count);
|
||||
|
||||
/* Initialize the d-channel */
|
||||
|
@ -394,6 +372,8 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
|||
wflags = FTDM_READ;
|
||||
memset(poll_events, 0, sizeof(short)*span->chan_count);
|
||||
|
||||
poll_events[i] |= FTDM_EVENTS;
|
||||
|
||||
for (i = 0, citer = ftdm_span_get_chan_iterator(span, chaniter); citer; citer = ftdm_iterator_next(citer), i++) {
|
||||
ftdmchan = ftdm_iterator_current(citer);
|
||||
|
||||
|
@ -416,6 +396,7 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
|||
case FTDM_TIMEOUT:
|
||||
break;
|
||||
case FTDM_SUCCESS:
|
||||
/* Check if there are any channels that have data available */
|
||||
for (citer = ftdm_span_get_chan_iterator(span, chaniter); citer; citer = ftdm_iterator_next(citer)) {
|
||||
len = 1000;
|
||||
ftdmchan = ftdm_iterator_current(citer);
|
||||
|
@ -444,6 +425,12 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if there are any channels that have events available */
|
||||
while (ftdm_span_next_event(span, &event) == FTDM_SUCCESS) {
|
||||
ftdm_sangoma_isdn_process_phy_events(span, event->enum_id);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "Unhandled IO event\n");
|
||||
|
@ -487,7 +474,6 @@ static void *ftdm_sangoma_isdn_run(ftdm_thread_t *me, void *obj)
|
|||
}
|
||||
|
||||
while (ftdm_running() && !(ftdm_test_flag(span, FTDM_SPAN_STOP_THREAD))) {
|
||||
|
||||
/* Check if there are any timers to process */
|
||||
ftdm_sched_run(signal_data->sched);
|
||||
ftdm_span_trigger_signals(span);
|
||||
|
@ -525,9 +511,6 @@ static void *ftdm_sangoma_isdn_run(ftdm_thread_t *me, void *obj)
|
|||
ftdm_log(FTDM_LOG_ERROR, "%s: ftdm_interrupt_wait returned with unknown code\n", span->name);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Poll for events, e.g HW DTMF */
|
||||
ftdm_sangoma_isdn_poll_events(span);
|
||||
}
|
||||
|
||||
/* clear the IN_THREAD flag so that we know the thread is done */
|
||||
|
|
|
@ -177,7 +177,7 @@ typedef enum {
|
|||
SNGISDN_TRANSFER_INVALID,
|
||||
} sngisdn_transfer_type_t;
|
||||
#define SNGISDN_TRANSFER_TYPE_STRINGS "NONE", "ATT_COURTESY_VRU", "ATT_COURTERY_VRU_DATA", "INVALID"
|
||||
FTDM_STR2ENUM_P(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t)
|
||||
SNGISDN_STR2ENUM_P(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t)
|
||||
|
||||
/* From section 4.2 of TR50075, max length of data is 100 when single UUI is sent */
|
||||
#define COURTESY_TRANSFER_MAX_DATA_SIZE 100
|
||||
|
@ -251,7 +251,8 @@ typedef struct sngisdn_span_data {
|
|||
uint8_t raw_trace_q931; /* TODO: combine with trace_flags */
|
||||
uint8_t raw_trace_q921; /* TODO: combine with trace_flags */
|
||||
uint8_t timer_t3;
|
||||
uint8_t restart_opt;
|
||||
uint8_t restart_opt;
|
||||
uint8_t force_sending_complete;
|
||||
char* local_numbers[SNGISDN_NUM_LOCAL_NUMBERS];
|
||||
ftdm_sched_t *sched;
|
||||
ftdm_queue_t *event_queue;
|
||||
|
@ -323,6 +324,11 @@ typedef struct ftdm_sngisdn_data {
|
|||
uint8_t num_dchan;
|
||||
sngisdn_dchan_data_t dchans[MAX_L1_LINKS+1];
|
||||
sngisdn_span_data_t *spans[MAX_L1_LINKS+1]; /* spans are indexed by link_id */
|
||||
|
||||
#ifdef SANGOMA_ISDN_CHAN_ID_INVERT_BIT
|
||||
/* Since this is a global configuration, place it here instead of sngisdn_span_data_t */
|
||||
uint8_t chan_id_invert_extend_bit;
|
||||
#endif
|
||||
}ftdm_sngisdn_data_t;
|
||||
|
||||
typedef struct ftdm2trillium
|
||||
|
|
|
@ -286,7 +286,8 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
|
|||
signal_data->restart_opt = SNGISDN_OPT_DEFAULT;
|
||||
signal_data->link_id = span->span_id;
|
||||
signal_data->transfer_timeout = 20000;
|
||||
signal_data->att_remove_dtmf = 1;
|
||||
signal_data->att_remove_dtmf = SNGISDN_OPT_DEFAULT;
|
||||
signal_data->force_sending_complete = SNGISDN_OPT_DEFAULT;
|
||||
|
||||
span->default_caller_data.dnis.plan = FTDM_NPI_INVALID;
|
||||
span->default_caller_data.dnis.type = FTDM_TON_INVALID;
|
||||
|
@ -386,10 +387,18 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
|
|||
parse_yesno(var, val, &signal_data->raw_trace_q931);
|
||||
} else if (!strcasecmp(var, "q921-raw-trace")) {
|
||||
parse_yesno(var, val, &signal_data->raw_trace_q921);
|
||||
} else if (!strcasecmp(var, "force-sending-complete")) {
|
||||
parse_yesno(var, val, &signal_data->force_sending_complete);
|
||||
} else if (!strcasecmp(var, "early-media-override")) {
|
||||
if (parse_early_media(val, span) != FTDM_SUCCESS) {
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
} else if (!strcasecmp(var, "chan-id-invert-extend-bit")) {
|
||||
#ifdef SANGOMA_ISDN_CHAN_ID_INVERT_BIT
|
||||
parse_yesno(var, val, &g_sngisdn_data.chan_id_invert_extend_bit);
|
||||
#else
|
||||
ftdm_log(FTDM_LOG_WARNING, "chan-id-invert-extend-bit is not supported in your version of libsng_isdn\n");
|
||||
#endif
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_WARNING, "Ignoring unknown parameter %s\n", ftdm_parameters[paramindex].var);
|
||||
}
|
||||
|
|
|
@ -624,7 +624,7 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
|||
cfg.t.cfg.s.inDLSAP.tCbCfg = TRUE;
|
||||
|
||||
cfg.t.cfg.s.inDLSAP.tCbId = signal_data->cc_id;
|
||||
|
||||
|
||||
if (signal_data->facility == SNGISDN_OPT_TRUE) {
|
||||
cfg.t.cfg.s.inDLSAP.facilityHandling = IN_FACILITY_STANDRD;
|
||||
} else {
|
||||
|
@ -720,6 +720,16 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
|||
}
|
||||
|
||||
cfg.t.cfg.s.inDLSAP.useSubAdr = 0; /* call routing on subaddress */
|
||||
#ifdef SANGOMA_ISDN_CHAN_ID_INVERT_BIT
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_DMS100 &&
|
||||
g_sngisdn_data.chan_id_invert_extend_bit == SNGISDN_OPT_TRUE) {
|
||||
/* Since this feature is not standard, we modified Trillium to check
|
||||
the useSubAdr field and remove the extended bit if this is set, this
|
||||
is a global configuration and once set, applies to all spans configured
|
||||
as DMS 100 */
|
||||
cfg.t.cfg.s.inDLSAP.useSubAdr = PRSNT_NODEF;
|
||||
}
|
||||
#endif
|
||||
cfg.t.cfg.s.inDLSAP.adrPref = 0; /* use of prefix for international calls */
|
||||
cfg.t.cfg.s.inDLSAP.nmbPrefDig = 0; /* number of digits used for prefix */
|
||||
for (i = 0; i < IN_MAXPREFDIG; i++)
|
||||
|
|
|
@ -882,6 +882,12 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
|
|||
uint8_t call_state = 0;
|
||||
|
||||
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
|
||||
|
||||
if (!suInstId && !spInstId) {
|
||||
/* We already cleared this call */
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Dropping STATUS CONFIRM (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (staEvnt->callSte.eh.pres && staEvnt->callSte.callGlblSte.pres) {
|
||||
call_state = staEvnt->callSte.callGlblSte.val;
|
||||
|
@ -1137,7 +1143,7 @@ static ftdm_status_t sngisdn_force_down(ftdm_channel_t *ftdmchan)
|
|||
sngisdn_chan_data_t *sngisdn_info = (sngisdn_chan_data_t*)ftdmchan->call_data;
|
||||
ftdm_status_t status = FTDM_SUCCESS;
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_NOTICE, "Forcing channel to DOWN state (%s)\n", ftdm_channel_state2str(ftdmchan->state));
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Forcing channel to DOWN state (%s)\n", ftdm_channel_state2str(ftdmchan->state));
|
||||
switch (ftdmchan->state) {
|
||||
case FTDM_CHANNEL_STATE_DOWN:
|
||||
/* Do nothing */
|
||||
|
|
|
@ -51,9 +51,10 @@ void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
|
|||
ftdm_mutex_unlock(g_sngisdn_data.ccs[signal_data->cc_id].mutex);
|
||||
|
||||
memset(&conEvnt, 0, sizeof(conEvnt));
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN) {
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN || signal_data->force_sending_complete == SNGISDN_OPT_TRUE) {
|
||||
conEvnt.sndCmplt.eh.pres = PRSNT_NODEF;
|
||||
}
|
||||
|
||||
if (ftdmchan->span->trunk_type == FTDM_TRUNK_BRI_PTMP &&
|
||||
signal_data->signalling == SNGISDN_SIGNALING_NET) {
|
||||
sngisdn_info->ces = CES_MNGMNT;
|
||||
|
|
|
@ -502,12 +502,16 @@ void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
|
|||
sngisdn_event_data_t *sngisdn_event = NULL;
|
||||
|
||||
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
|
||||
|
||||
|
||||
/* We sometimes receive a STA CFM after receiving a RELEASE/RELEASE COMPLETE, so we need to lock
|
||||
here in case we are calling clear_call_data at the same time this function is called */
|
||||
|
||||
ftdm_mutex_lock(g_sngisdn_data.ccs[suId].mutex);
|
||||
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
|
||||
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
|
||||
|
||||
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
|
||||
ftdm_assert(0, "Inconsistent call states\n");
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[suId].mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -526,6 +530,7 @@ void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
|
|||
memcpy(&sngisdn_event->event.staEvnt, staEvnt, sizeof(*staEvnt));
|
||||
|
||||
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[suId].mutex);
|
||||
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||
}
|
||||
|
||||
|
|
|
@ -99,13 +99,14 @@ void clear_call_data(sngisdn_chan_data_t *sngisdn_info)
|
|||
ftdm_mutex_lock(g_sngisdn_data.ccs[cc_id].mutex);
|
||||
g_sngisdn_data.ccs[cc_id].active_spInstIds[sngisdn_info->spInstId]=NULL;
|
||||
g_sngisdn_data.ccs[cc_id].active_suInstIds[sngisdn_info->suInstId]=NULL;
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[cc_id].mutex);
|
||||
|
||||
|
||||
sngisdn_info->suInstId = 0;
|
||||
sngisdn_info->spInstId = 0;
|
||||
sngisdn_info->globalFlg = 0;
|
||||
sngisdn_info->flags = 0;
|
||||
sngisdn_info->transfer_data.type = SNGISDN_TRANSFER_NONE;
|
||||
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[cc_id].mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ ftdm_status_t sngisdn_att_transfer_process_dtmf(ftdm_channel_t *ftdmchan, const
|
|||
att_courtesy_transfer_complete(sngisdn_info, sngisdn_info->transfer_data.response);
|
||||
}
|
||||
|
||||
if (signal_data->att_remove_dtmf) {
|
||||
if (signal_data->att_remove_dtmf != SNGISDN_OPT_FALSE) {
|
||||
/* If we return FTDM_BREAK, dtmf event is not queue'ed to user */
|
||||
status = FTDM_BREAK;
|
||||
}
|
||||
|
|
|
@ -584,6 +584,20 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
|
||||
break;
|
||||
/**************************************************************************/
|
||||
case FTDM_CHANNEL_STATE_HANGUP_COMPLETE:
|
||||
|
||||
/* already hangup complete, just ignore it */
|
||||
/*
|
||||
* i.e. collision REL & ANM
|
||||
* IAM ->
|
||||
* <- ACM
|
||||
* REL -> <- ANM (if REL gets processed first, ANM needs to be ignored)
|
||||
* <- RLC
|
||||
*/
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx ANM/CON Ignoring it because we already hung up\n", sngss7_info->circuit->cic);
|
||||
|
||||
break;
|
||||
/**************************************************************************/
|
||||
default: /* incorrect state...reset the CIC */
|
||||
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx ANM/CON\n", sngss7_info->circuit->cic);
|
||||
|
@ -1267,7 +1281,7 @@ ftdm_status_t handle_resume(uint32_t suInstId, uint32_t spInstId, uint32_t circu
|
|||
|
||||
/* confirm that the circuit is active on our side otherwise move to the next circuit */
|
||||
if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[i], SNGSS7_ACTIVE)) {
|
||||
SS7_ERROR("[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
|
||||
ftdm_log(FTDM_LOG_DEBUG, "[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1072,16 +1072,20 @@ static __inline__ ftdm_status_t zt_channel_process_event(ftdm_channel_t *fchan,
|
|||
break;
|
||||
case ZT_EVENT_BADFCS:
|
||||
{
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "Bad frame checksum (ZT_EVENT_BADFCS)!\n");
|
||||
/* What else could we do? */
|
||||
*event_id = FTDM_OOB_NOOP;
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "Bad frame checksum (ZT_EVENT_BADFCS)\n");
|
||||
*event_id = FTDM_OOB_NOOP; /* What else could we do? */
|
||||
}
|
||||
break;
|
||||
case ZT_EVENT_OVERRUN:
|
||||
{
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "Driver overrun! (ZT_EVENT_OVERRUN)\n");
|
||||
/* What else could we do? */
|
||||
*event_id = FTDM_OOB_NOOP;
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "HDLC frame overrun (ZT_EVENT_OVERRUN)\n");
|
||||
*event_id = FTDM_OOB_NOOP; /* What else could we do? */
|
||||
}
|
||||
break;
|
||||
case ZT_EVENT_ABORT:
|
||||
{
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "HDLC abort frame received (ZT_EVENT_ABORT)\n");
|
||||
*event_id = FTDM_OOB_NOOP; /* What else could we do? */
|
||||
}
|
||||
break;
|
||||
case ZT_EVENT_NONE:
|
||||
|
|
|
@ -599,8 +599,8 @@ FT_DECLARE(ftdm_iterator_t *) ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_
|
|||
|
||||
FT_DECLARE(ftdm_status_t) ftdm_channel_process_media(ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen);
|
||||
|
||||
FIO_WRITE_FUNCTION(ftdm_raw_write);
|
||||
FIO_READ_FUNCTION(ftdm_raw_read);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_read (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_write (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen);
|
||||
|
||||
/*!
|
||||
* \brief Retrieves an event from the span
|
||||
|
|
|
@ -1908,6 +1908,8 @@ void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, const char
|
|||
int on = 0;
|
||||
int len = 0;
|
||||
char *my_body = strdup(body);
|
||||
char *my_body_base = my_body;
|
||||
|
||||
assert(handle != NULL);
|
||||
assert(body != NULL);
|
||||
|
||||
|
@ -1952,7 +1954,9 @@ void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, const char
|
|||
free(bdup);
|
||||
}
|
||||
|
||||
free(my_body);
|
||||
if (my_body_base) {
|
||||
free(my_body_base);
|
||||
}
|
||||
|
||||
apr_queue_push(handle->queue, msg);
|
||||
msg = NULL;
|
||||
|
|
|
@ -231,7 +231,7 @@ void stfu_n_debug(stfu_instance_t *i, const char *name)
|
|||
|
||||
void stfu_n_report(stfu_instance_t *i, stfu_report_t *r)
|
||||
{
|
||||
assert(i);
|
||||
stfu_assert(i);
|
||||
r->qlen = i->qlen;
|
||||
r->packet_in_count = i->period_packet_in_count;
|
||||
r->clean_count = i->period_clean_count;
|
||||
|
@ -580,7 +580,7 @@ static int stfu_n_find_any_frame(stfu_instance_t *in, stfu_queue_t *queue, stfu_
|
|||
uint32_t i = 0;
|
||||
stfu_frame_t *frame = NULL;
|
||||
|
||||
assert(r_frame);
|
||||
stfu_assert(r_frame);
|
||||
|
||||
*r_frame = NULL;
|
||||
|
||||
|
|
|
@ -40,6 +40,13 @@ extern "C" {
|
|||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#if (_MSC_VER >= 1400) // VC8+
|
||||
#define stfu_assert(expr) assert(expr);__analysis_assume( expr )
|
||||
#endif
|
||||
|
||||
#ifndef stfu_assert
|
||||
#define stfu_assert(_x) assert(_x)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifndef uint32_t
|
||||
|
|
|
@ -1 +1 @@
|
|||
Mon Feb 22 09:40:01 CST 2010
|
||||
Thu Jun 16 15:02:31 UTC 2011
|
||||
|
|
|
@ -14,3 +14,4 @@ Contributor(s):
|
|||
Carlos Pina Soares
|
||||
Chaitanya Chokkareddy <chaitanya.chokkareddy@gmail.com>
|
||||
Tomas Valenta <tomas.valenta@speechtech.cz>
|
||||
Danijel Korzinek <danijel.korzinek@gmail.com>
|
||||
|
|
|
@ -14,7 +14,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure $(AUX_DIST)
|
|||
|
||||
ACLOCAL = aclocal -I $(macrodir)
|
||||
|
||||
SUBDIRS = conf data libs modules plugins platforms build
|
||||
SUBDIRS = build conf data libs modules plugins platforms
|
||||
if TEST_SUITES
|
||||
SUBDIRS += tests
|
||||
endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
The UniMRCP Project (http://www.unimrcp.org)
|
||||
Copyright (C) 2008 Arsen Chaloyan
|
||||
Copyright (C) 2008-2010 Arsen Chaloyan
|
||||
Licensed under the Apache License, Version 2.0 (the "License").
|
||||
|
||||
This product includes a number of subcomponents with
|
||||
|
|
|
@ -3,7 +3,6 @@ m4_include([build/acmacros/apu.m4])
|
|||
m4_include([build/acmacros/find_apr.m4])
|
||||
m4_include([build/acmacros/find_apu.m4])
|
||||
m4_include([build/acmacros/sofia-sip.m4])
|
||||
m4_include([build/acmacros/swift.m4])
|
||||
m4_include([build/acmacros/sphinxbase.m4])
|
||||
m4_include([build/acmacros/pocketsphinx.m4])
|
||||
m4_include([build/acmacros/flite.m4])
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
CLEANFILES = uni_revision.h
|
||||
|
||||
SUBDIRS = pkgconfig
|
||||
SUBDIRS = pkgconfig svnrev
|
||||
|
||||
include_HEADERS = uni_version.h
|
||||
include_HEADERS = uni_version.h uni_revision.h
|
||||
|
||||
uni_revision.h :
|
||||
svnrev/svnrev -rsvnrev/svnrev.input -p../ -ouni_revision.h
|
||||
|
|
|
@ -13,21 +13,28 @@ AC_DEFUN([UNIMRCP_CHECK_FLITE],
|
|||
|
||||
found_flite="no"
|
||||
|
||||
flite_libdir="build/libs"
|
||||
flite_config="config/config"
|
||||
for dir in $flite_path ; do
|
||||
cd $dir && flite_dir=`pwd` && cd - > /dev/null
|
||||
if test -d "$dir/$flite_libdir"; then
|
||||
found_flite="yes"
|
||||
UNIMRCP_FLITE_INCLUDES="-I$flite_dir/include"
|
||||
UNIMRCP_FLITE_LIBS="$dir/$flite_libdir/libflite_cmu_us_awb.a \
|
||||
$dir/$flite_libdir/libflite_cmu_us_kal.a \
|
||||
$dir/$flite_libdir/libflite_cmu_us_rms.a \
|
||||
$dir/$flite_libdir/libflite_cmu_us_slt.a \
|
||||
$dir/$flite_libdir/libflite_cmulex.a \
|
||||
$dir/$flite_libdir/libflite_usenglish.a \
|
||||
$dir/$flite_libdir/libflite.a"
|
||||
break
|
||||
fi
|
||||
if test -f "$flite_dir/$flite_config"; then
|
||||
target_os=`grep TARGET_OS "$flite_dir/$flite_config" | sed "s/^.*= //"` ;\
|
||||
target_cpu=`grep TARGET_CPU "$flite_dir/$flite_config" | sed "s/^.*= //"` ;\
|
||||
flite_libdir=$flite_dir/build/$target_cpu-$target_os/lib
|
||||
if test -d "$flite_libdir"; then
|
||||
UNIMRCP_FLITE_INCLUDES="-I$flite_dir/include"
|
||||
UNIMRCP_FLITE_LIBS="$flite_libdir/libflite_cmu_us_awb.a \
|
||||
$flite_libdir/libflite_cmu_us_kal.a \
|
||||
$flite_libdir/libflite_cmu_us_rms.a \
|
||||
$flite_libdir/libflite_cmu_us_slt.a \
|
||||
$flite_libdir/libflite_cmulex.a \
|
||||
$flite_libdir/libflite_usenglish.a \
|
||||
$flite_libdir/libflite.a"
|
||||
found_flite="yes"
|
||||
break
|
||||
else
|
||||
AC_MSG_WARN(Cannot find Flite lib dir: $flite_libdir)
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if test x_$found_flite != x_yes; then
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
dnl UNIMRCP_CHECK_SWIFT
|
||||
|
||||
AC_DEFUN([UNIMRCP_CHECK_SWIFT],
|
||||
[
|
||||
AC_MSG_NOTICE([Cepstral Swift library configuration])
|
||||
|
||||
AC_MSG_CHECKING([for Swift])
|
||||
AC_ARG_WITH(swift,
|
||||
[ --with-swift=PATH prefix for installed Swift],
|
||||
[swift_path=$withval],
|
||||
[swift_path="/opt/swift"]
|
||||
)
|
||||
|
||||
if test -d "$swift_path"; then
|
||||
found_swift="yes"
|
||||
UNIMRCP_SWIFT_INCLUDES="-I$swift_path/include"
|
||||
UNIMRCP_SWIFT_LIBS="-lswift -lceplex_us -lceplang_en -lm"
|
||||
UNIMRCP_SWIFT_LDFLAGS="-L$swift_path/lib/ -R$swift_path/lib/"
|
||||
|
||||
AC_SUBST(UNIMRCP_SWIFT_INCLUDES)
|
||||
AC_SUBST(UNIMRCP_SWIFT_LIBS)
|
||||
AC_SUBST(UNIMRCP_SWIFT_LDFLAGS)
|
||||
|
||||
AC_MSG_RESULT($swift_path)
|
||||
else
|
||||
AC_MSG_WARN([not found - looked for $swift_path])
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,271 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# unimrcp-server This shell script takes care of starting and stopping the UniMRCP server.
|
||||
#
|
||||
# chkconfig: 2345 65 35
|
||||
# description: UniMRCP is an open source MRCP v1 & v2 server
|
||||
|
||||
# Some global variables
|
||||
|
||||
# Application
|
||||
APP_NAME="unimrcpserver"
|
||||
APP_LONG_NAME="unimrcpserver"
|
||||
UNIMRCP_DIR="/usr/local/unimrcp/"
|
||||
|
||||
EXEC="${UNIMRCP_DIR}bin/${APP_NAME} -d -o 2 -r ${UNIMRCP_DIR}"
|
||||
|
||||
# sudo user
|
||||
USERNAME=root
|
||||
|
||||
# Priority at which to run the server. See "man nice" for valid priorities.
|
||||
# nice is only used if a priority is specified.
|
||||
PRIORITY=
|
||||
|
||||
# Location of the pid file.
|
||||
PIDDIR="/var/run/"
|
||||
pid=
|
||||
|
||||
LOG="/var/log/${APP_NAME}.log"
|
||||
|
||||
if [ -e $PIDDIR ]; then
|
||||
echo
|
||||
else
|
||||
mkdir $PIDDIR
|
||||
fi
|
||||
|
||||
# Allow configuration overrides in /etc/sysconfig/$APP_NAME
|
||||
CONFIGFILE=/etc/sysconfig/$APP_NAME
|
||||
|
||||
[ -x $CONFIGFILE ] && . $CONFIGFILE
|
||||
|
||||
# Do not modify anything beyond this point
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Get the fully qualified path to the script
|
||||
case $0 in
|
||||
/*)
|
||||
SCRIPT="$0"
|
||||
;;
|
||||
*)
|
||||
PWD=`pwd`
|
||||
SCRIPT="$PWD/$0"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Change spaces to ":" so the tokens can be parsed.
|
||||
SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
|
||||
# Get the real path to this script, resolving any symbolic links
|
||||
TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
|
||||
REALPATH=
|
||||
for C in $TOKENS; do
|
||||
REALPATH="$REALPATH/$C"
|
||||
while [ -h "$REALPATH" ] ; do
|
||||
LS="`ls -ld "$REALPATH"`"
|
||||
LINK="`expr "$LS" : '.*-> \(.*\)$'`"
|
||||
if expr "$LINK" : '/.*' > /dev/null; then
|
||||
REALPATH="$LINK"
|
||||
else
|
||||
REALPATH="`dirname "$REALPATH"`""/$LINK"
|
||||
fi
|
||||
done
|
||||
done
|
||||
# Change ":" chars back to spaces.
|
||||
REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`
|
||||
|
||||
# Change the current directory to the location of the script
|
||||
cd "`dirname "$REALPATH"`"
|
||||
|
||||
chown $USERNAME $PIDDIR
|
||||
|
||||
# Process ID
|
||||
PIDFILE="$PIDDIR/$APP_NAME.pid"
|
||||
|
||||
# Resolve the location of the 'ps' command
|
||||
PSEXE="/usr/bin/ps"
|
||||
if [ ! -x $PSEXE ]
|
||||
then
|
||||
PSEXE="/bin/ps"
|
||||
if [ ! -x $PSEXE ]
|
||||
then
|
||||
echo "Unable to locate 'ps'."
|
||||
echo "Please report this with the location on your system."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Build the nice clause
|
||||
if [ "X$PRIORITY" = "X" ]
|
||||
then
|
||||
CMDNICE=""
|
||||
else
|
||||
CMDNICE="nice -$PRIORITY"
|
||||
fi
|
||||
|
||||
getpid() {
|
||||
if [ -f $PIDFILE ]
|
||||
then
|
||||
if [ -r $PIDFILE ]
|
||||
then
|
||||
pid=`cat $PIDFILE`
|
||||
if [ "X$pid" != "X" ]
|
||||
then
|
||||
# Verify that a process with this pid is still running.
|
||||
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
# This is a stale pid file.
|
||||
rm -f $PIDFILE
|
||||
echo "Removed stale pid file: $PIDFILE"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Cannot read $PIDFILE."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
testpid() {
|
||||
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
# Process is gone so remove the pid file.
|
||||
rm -f $PIDFILE
|
||||
fi
|
||||
}
|
||||
|
||||
console() {
|
||||
echo "Running $APP_LONG_NAME..."
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
exec sudo -u $USERNAME $CMDNICE $EXEC
|
||||
else
|
||||
echo "$APP_LONG_NAME is already running."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
echo "Starting $APP_LONG_NAME..."
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
sudo -u $USERNAME $CMDNICE $EXEC
|
||||
pid=`$PSEXE -C $APP_NAME -o pid=`
|
||||
echo $pid
|
||||
echo $pid > $PIDFILE
|
||||
else
|
||||
echo "$APP_LONG_NAME is already running."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
stopit() {
|
||||
echo "Stopping $APP_LONG_NAME..."
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
echo "$APP_LONG_NAME was not running."
|
||||
else
|
||||
# Running so try to stop it.
|
||||
sudo -u $USERNAME kill $pid
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# An explanation for the failure should have been given
|
||||
echo "Unable to stop $APP_LONG_NAME."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We can not predict how long it will take for the wrapper to
|
||||
# actually stop as it depends on settings in wrapper.conf.
|
||||
# Loop until it does.
|
||||
savepid=$pid
|
||||
CNT=0
|
||||
TOTCNT=0
|
||||
while [ "X$pid" != "X" ]
|
||||
do
|
||||
# Loop for up to 5 minutes
|
||||
if [ "$TOTCNT" -lt "300" ]
|
||||
then
|
||||
if [ "$CNT" -lt "5" ]
|
||||
then
|
||||
CNT=`expr $CNT + 1`
|
||||
else
|
||||
echo "Waiting for $APP_LONG_NAME to exit..."
|
||||
CNT=0
|
||||
fi
|
||||
TOTCNT=`expr $TOTCNT + 1`
|
||||
|
||||
sleep 1
|
||||
|
||||
testpid
|
||||
else
|
||||
pid=
|
||||
fi
|
||||
done
|
||||
|
||||
pid=$savepid
|
||||
testpid
|
||||
if [ "X$pid" != "X" ]
|
||||
then
|
||||
echo "Timed out waiting for $APP_LONG_NAME to exit."
|
||||
echo " Attempting a forced exit..."
|
||||
kill -9 $pid
|
||||
fi
|
||||
|
||||
pid=$savepid
|
||||
testpid
|
||||
if [ "X$pid" != "X" ]
|
||||
then
|
||||
echo "Failed to stop $APP_LONG_NAME."
|
||||
exit 1
|
||||
else
|
||||
echo "Stopped $APP_LONG_NAME."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
status() {
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
echo "$APP_LONG_NAME is not running."
|
||||
exit 1
|
||||
else
|
||||
echo "$APP_LONG_NAME is running ($pid)."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
||||
'console')
|
||||
console
|
||||
;;
|
||||
|
||||
'start')
|
||||
start
|
||||
;;
|
||||
|
||||
'stop')
|
||||
stopit
|
||||
;;
|
||||
|
||||
'restart')
|
||||
stopit
|
||||
start
|
||||
;;
|
||||
|
||||
'status')
|
||||
status
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 { console | start | stop | restart | status }"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
INCLUDES = $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
|
||||
|
||||
noinst_PROGRAMS = svnrev
|
||||
svnrev_LDADD = $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
|
||||
svnrev_SOURCES = svnrev.c
|
||||
|
||||
rev:
|
||||
./svnrev -rsvnrev.input -p../../ -o../uni_revision.h
|
|
@ -0,0 +1,381 @@
|
|||
/* SvnRev
|
||||
*
|
||||
* This utility retrieves the highest number that follows the "$Id: $" keyword
|
||||
* or a combination of the $Rev: $ and $Date: $ keywords. The Subversion
|
||||
* version control system expands these keywords and keeps them up to date.
|
||||
* For an example of the tag, see the end of this comment.
|
||||
*
|
||||
* Details on the usage and the operation of this utility is available on-line
|
||||
* at http://www.compuphase.com/svnrev.htm.
|
||||
*
|
||||
*
|
||||
* Acknowledgements
|
||||
*
|
||||
* The support for .java files is contributed by Tom McCann (tommc@spoken.com).
|
||||
* The option for prefixing and/or suffixing the build number (in the string
|
||||
* constant SVN_REVSTR) was suggested by Robert Nitzel.
|
||||
*
|
||||
*
|
||||
* License
|
||||
*
|
||||
* Copyright (c) 2005-2009, ITB CompuPhase (www.compuphase.com).
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
* the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software in
|
||||
* a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id: svnrev.c 1497 2010-02-12 17:20:21Z achaloyan $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <apr_pools.h>
|
||||
#include <apr_file_io.h>
|
||||
|
||||
|
||||
#if defined __WIN32__ || defined _Win32 || defined _WIN32
|
||||
#define DIRSEP '\\'
|
||||
#elif defined macintosh
|
||||
#define DIRSEP ':'
|
||||
#else
|
||||
/* assume Linux/Unix */
|
||||
#define DIRSEP '/'
|
||||
#endif
|
||||
|
||||
#define MAX_LINELENGTH 512
|
||||
#define MAX_SYMBOLLENGTH 32
|
||||
|
||||
static void about(void)
|
||||
{
|
||||
printf("svnrev 1.7.\n\n");
|
||||
printf("Usage: svnrev [options] <input> [input [...]]\n\n"
|
||||
"Options:\n"
|
||||
"-ofilename\tOutput filename for the file with the build number. When no\n"
|
||||
"\t\tfilename follows \"-o\", the result is written to stdout. The\n"
|
||||
"\t\tdefault filename is \"svnrev.h\" for C/C++ and \"VersionInfo.java\"\n"
|
||||
"\t\tfor Java.\n\n"
|
||||
"-fpattern\tFormat: Adds text before or after the build number in the\n"
|
||||
"\t\tconstant SVN_REVSTR. The pattern has the form \"text#text\"\n"
|
||||
"\t\t(without the quotes) where \"text\" is arbitrary text and \"#\"\n"
|
||||
"\t\twill be replaced by the build number.\n\n"
|
||||
"-i\t\tIncremental: this option should be used when the list of input\n"
|
||||
"\t\tfiles is a subset of all files in the project. When -i is\n"
|
||||
"\t\tpresent, svnrev also scans the output file that was generated\n"
|
||||
"\t\ton a previous run.\n\n"
|
||||
"-jname\t\tJava: this option writes a java package file instead of a C/C++\n"
|
||||
"\t\theader file. The name of the Java package must follow the\n"
|
||||
"\t\toption (this is not the filename).\n\n"
|
||||
"-v\t\tVerbose: prints the names of files that are modified since the\n"
|
||||
"\t\tlast commit (into version control) to stderr.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void processfile(const char *name, int failsilent,
|
||||
int *max_build, int *accum_build,
|
||||
int *max_year, int *max_month, int *max_day,
|
||||
int *ismodified)
|
||||
|
||||
{
|
||||
char str[MAX_LINELENGTH], str_base[MAX_LINELENGTH];
|
||||
char name_base[MAX_LINELENGTH];
|
||||
char *p1;
|
||||
FILE *fp, *fp_base;
|
||||
int build, maj_build;
|
||||
int year, month, day;
|
||||
int cnt;
|
||||
char modchar;
|
||||
|
||||
/* since we also want to verify whether the file is modified in version
|
||||
* control, get the path to the working copy name
|
||||
* for every source file "<path>\<filename>, the "working copy" base can
|
||||
* be found in "<path>\.svn\text-base\<filename>.svn-base"
|
||||
*/
|
||||
if ((p1 = strrchr(name, DIRSEP)) != NULL) {
|
||||
++p1; /* skip directory separator character ('\' in Windows, '/' in Linux) */
|
||||
strncpy(name_base, name, (int)(p1 - name));
|
||||
name_base[(int)(p1 - name)] = '\0';
|
||||
} else {
|
||||
name_base[0] = '\0';
|
||||
p1 = (char*)name;
|
||||
} /* if */
|
||||
sprintf(name_base + strlen(name_base), ".svn%ctext-base%c%s.svn-base",
|
||||
DIRSEP, DIRSEP, p1);
|
||||
|
||||
/* first extract the revision keywords */
|
||||
fp = fopen(name, "r");
|
||||
if (fp == NULL) {
|
||||
if (!failsilent)
|
||||
fprintf(stderr, "Failed to open input file '%s'\n", name);
|
||||
return;
|
||||
} /* if */
|
||||
fp_base = fopen(name_base, "r"); /* fail silently */
|
||||
build = 0;
|
||||
maj_build = 0; /* RCS / CVS */
|
||||
year = month = day = 0;
|
||||
|
||||
while (fgets(str, sizeof str, fp) != NULL) {
|
||||
if (fp_base == NULL || fgets(str_base, sizeof str_base, fp_base) == NULL)
|
||||
str_base[0] = '\0';
|
||||
if ((p1 = strstr(str, "$Id:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Id: %*s %d %d-%d-%d", &build, &year, &month, &day) < 4
|
||||
&& sscanf(p1, "$Id: %*s %d %d/%d/%d", &build, &year, &month, &day) < 4)
|
||||
if (sscanf(p1, "$Id: %*s %d.%d %d-%d-%d", &maj_build, &build, &year, &month, &day) < 5)
|
||||
sscanf(p1, "$Id: %*s %d.%d %d/%d/%d", &maj_build, &build, &year, &month, &day);
|
||||
} else if ((p1 = strstr(str, "$Rev:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Rev: %d.%d", &maj_build, &build) < 2) {
|
||||
sscanf(p1, "$Rev: %d", &build);
|
||||
maj_build = 0;
|
||||
} /* if */
|
||||
} else if ((p1 = strstr(str, "$Revision:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Revision: %d.%d", &maj_build, &build) < 2) {
|
||||
/* SvnRev also writes this keyword in its own generated file; read it
|
||||
* back for partial updates
|
||||
*/
|
||||
cnt = sscanf(p1, "$Revision: %d%c", &build, &modchar);
|
||||
if (cnt == 2 && modchar == 'M' && ismodified != NULL)
|
||||
*ismodified = 1;
|
||||
maj_build = 0;
|
||||
} /* if */
|
||||
} else if ((p1 = strstr(str, "$Date:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Date: %d-%d-%d", &year, &month, &day) < 3)
|
||||
sscanf(p1, "$Date: %d/%d/%d", &year, &month, &day);
|
||||
} else if (ismodified != NULL && *ismodified == 0 && fp_base != NULL) {
|
||||
/* no keyword present, compare the lines for equivalence */
|
||||
*ismodified = strcmp(str, str_base) != 0;
|
||||
} /* if */
|
||||
|
||||
if (maj_build)
|
||||
*accum_build += build; /* RCS / CVS */
|
||||
else if (build > *max_build)
|
||||
*max_build = build; /* Subversion */
|
||||
if (year > *max_year
|
||||
|| (year == *max_year && month > *max_month)
|
||||
|| (year == *max_year && month == *max_month && day > *max_day))
|
||||
{
|
||||
*max_year = year;
|
||||
*max_month = month;
|
||||
*max_day = day;
|
||||
} /* if */
|
||||
if (build > 0 && year > 0 && (fp_base == NULL || ismodified == NULL || *ismodified != 0))
|
||||
break; /* both build # and date found, not comparing or modification
|
||||
* already found => no need to search further */
|
||||
|
||||
} /* while */
|
||||
fclose(fp);
|
||||
if (fp_base != NULL)
|
||||
fclose(fp_base);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *outname = NULL;
|
||||
FILE *fp;
|
||||
FILE *input_file;
|
||||
char *input_file_name = NULL;
|
||||
char *path_prefix = NULL;
|
||||
int index;
|
||||
int process_self = 0;
|
||||
int verbose = 0;
|
||||
int max_build, accum_build;
|
||||
int max_year, max_month, max_day;
|
||||
int ismodified, filemodified;
|
||||
char prefix[MAX_SYMBOLLENGTH], suffix[MAX_SYMBOLLENGTH];
|
||||
char modified_suffix[2];
|
||||
int write_java = 0; /* flag for Java output, 0=.h output, 1=.java output */
|
||||
/* java package to put revision info in.
|
||||
* REVIEW - I assume if you want Java output you will specify a package. */
|
||||
char *java_package = NULL;
|
||||
|
||||
if (argc <= 1)
|
||||
about();
|
||||
|
||||
/* collect the options */
|
||||
prefix[0] = '\0';
|
||||
suffix[0] = '\0';
|
||||
|
||||
for (index = 1; index < argc; index++) {
|
||||
/* check for options */
|
||||
if (argv[index][0] == '-'
|
||||
#if defined __WIN32__ || defined _Win32 || defined _WIN32
|
||||
|| argv[index][0] == '/'
|
||||
#endif
|
||||
)
|
||||
{
|
||||
switch (argv[index][1]) {
|
||||
case 'f': {
|
||||
int len;
|
||||
char *ptr = strchr(&argv[index][2], '#');
|
||||
len = (ptr != NULL) ? (int)(ptr - &argv[index][2]) : (int)strlen(&argv[index][2]);
|
||||
if (len >= MAX_SYMBOLLENGTH)
|
||||
len = MAX_SYMBOLLENGTH - 1;
|
||||
strncpy(prefix, &argv[index][2], len);
|
||||
prefix[len] = '\0';
|
||||
ptr = (ptr != NULL) ? ptr + 1 : strchr(argv[index], '\0');
|
||||
len = (int)strlen(ptr);
|
||||
if (len >= MAX_SYMBOLLENGTH)
|
||||
len = MAX_SYMBOLLENGTH - 1;
|
||||
strncpy(suffix, ptr, len);
|
||||
suffix[len] = '\0';
|
||||
break;
|
||||
} /* case */
|
||||
case 'i':
|
||||
process_self = 1;
|
||||
break;
|
||||
case 'j':
|
||||
write_java=1;
|
||||
java_package = &argv[index][2];
|
||||
break;
|
||||
case 'o':
|
||||
outname = &argv[index][2];
|
||||
break;
|
||||
case 'r':
|
||||
input_file_name = &argv[index][2];
|
||||
break;
|
||||
case 'p':
|
||||
path_prefix = &argv[index][2];
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Invalid option '%s'\n", argv[index]);
|
||||
about();
|
||||
} /* switch */
|
||||
} /* if */
|
||||
} /* for */
|
||||
|
||||
if (outname == NULL)
|
||||
outname = write_java ? "SvnRevision.java" : "uni_revision.h";
|
||||
if (!process_self && *outname != '\0')
|
||||
remove(outname);
|
||||
|
||||
/* phase 1: scan through all files and get the highest build number */
|
||||
|
||||
max_build = 0;
|
||||
accum_build = 0; /* for RCS / CVS */
|
||||
max_year = max_month = max_day = 0;
|
||||
ismodified = 0;
|
||||
|
||||
if(input_file_name) {
|
||||
input_file = fopen(input_file_name, "r");
|
||||
if (input_file != NULL) {
|
||||
apr_dir_t *dir;
|
||||
apr_finfo_t finfo;
|
||||
apr_status_t rv;
|
||||
apr_pool_t *pool;
|
||||
char *file_path;
|
||||
char dir_path[256]; /* line */
|
||||
int offset = 0;
|
||||
if(path_prefix)
|
||||
offset = sprintf(dir_path, "%s", path_prefix);
|
||||
else
|
||||
offset = sprintf(dir_path, "../../");
|
||||
|
||||
apr_initialize();
|
||||
apr_pool_create(&pool,NULL);
|
||||
while (fgets(dir_path + offset, sizeof(dir_path) - offset, input_file) != NULL ) { /* read a line */
|
||||
size_t len = strlen(dir_path)-1;
|
||||
if(dir_path[len] == '\n')
|
||||
dir_path[len] = 0;
|
||||
rv = apr_dir_open(&dir,dir_path,pool);
|
||||
if(rv == APR_SUCCESS) {
|
||||
while (apr_dir_read(&finfo, APR_FINFO_NAME, dir) == APR_SUCCESS) { /* get next file */
|
||||
if(finfo.filetype != APR_REG) continue;
|
||||
|
||||
apr_filepath_merge(&file_path,dir_path,finfo.name,0,pool);
|
||||
|
||||
filemodified = 0;
|
||||
if (strcasecmp(file_path, outname)!=0)
|
||||
processfile(file_path, 0, &max_build, &accum_build, &max_year, &max_month, &max_day, &filemodified);
|
||||
if (filemodified && verbose)
|
||||
fprintf(stderr, "\tNotice: modified file '%s'\n", file_path);
|
||||
ismodified = ismodified || filemodified;
|
||||
}
|
||||
apr_dir_close(dir);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "No such directory '%s'\n", dir_path);
|
||||
}
|
||||
}
|
||||
fclose (input_file);
|
||||
apr_pool_destroy(pool);
|
||||
apr_terminate();
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "No such input file '%s'\n", input_file_name);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (index = 1; index < argc; index++) {
|
||||
/* skip the options (already handled) */
|
||||
if (argv[index][0] == '-'
|
||||
#if defined __WIN32__ || defined _Win32 || defined _WIN32
|
||||
|| argv[index][0] == '/'
|
||||
#endif
|
||||
)
|
||||
continue;
|
||||
|
||||
filemodified = 0;
|
||||
if (strcasecmp(argv[index], outname)!=0)
|
||||
processfile(argv[index], 0, &max_build, &accum_build, &max_year, &max_month, &max_day, &filemodified);
|
||||
if (filemodified && verbose)
|
||||
fprintf(stderr, "\tNotice: modified file '%s'\n", argv[index]);
|
||||
ismodified = ismodified || filemodified;
|
||||
} /* for */
|
||||
}
|
||||
|
||||
/* also run over the existing header file, if any */
|
||||
if (process_self && *outname != '\0')
|
||||
processfile(outname, 1, &max_build, &accum_build, &max_year, &max_month, &max_day, NULL/*&ismodified*/);
|
||||
|
||||
if (accum_build > max_build)
|
||||
max_build = accum_build;
|
||||
modified_suffix[0] = ismodified ? 'M' : '\0';
|
||||
modified_suffix[1] = '\0';
|
||||
|
||||
/* phase 2: write a file with this highest build number */
|
||||
if (*outname == '\0') {
|
||||
fp = stdout;
|
||||
} else if ((fp = fopen(outname, "w")) == NULL) {
|
||||
fprintf(stderr, "Failed to create output file '%s'\n", outname);
|
||||
return 2;
|
||||
} /* if */
|
||||
if (*outname != '\0') {
|
||||
/* don't print the comments to stdout */
|
||||
fprintf(fp, "/* This file was generated by the \"svnrev\" utility\n"
|
||||
" * (http://www.compuphase.com/svnrev.htm).\n"
|
||||
" * You should not modify it manually, as it may be re-generated.\n"
|
||||
" *\n"
|
||||
" * $Revision: %d%s$\n"
|
||||
" * $Date: %04d-%02d-%02d$\n"
|
||||
" */\n\n", max_build, modified_suffix, max_year, max_month, max_day);
|
||||
} /* if */
|
||||
|
||||
fprintf(fp, "#ifndef UNI_REVISION_H\n");
|
||||
fprintf(fp, "#define UNI_REVISION_H\n\n");
|
||||
fprintf(fp, "#define UNI_REVISION\t\t%d\n", max_build);
|
||||
fprintf(fp, "#define UNI_REVISION_STRING\t\"%s%d%s%s\"\n", prefix, max_build, modified_suffix, suffix);
|
||||
fprintf(fp, "#define UNI_REVISION_DATE\t\"%04d-%02d-%02d\"\n", max_year, max_month, max_day);
|
||||
fprintf(fp, "#define UNI_REVISION_STAMP\t%04d%02d%02dL\n", max_year, max_month, max_day);
|
||||
fprintf(fp, "#define UNI_REVISION_MODIFIED\t%d\n", ismodified);
|
||||
fprintf(fp, "\n#endif /* UNI_REVISION_H */\n");
|
||||
|
||||
if (*outname != '\0')
|
||||
fclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
build
|
||||
libs/apr-toolkit/include
|
||||
libs/apr-toolkit/src
|
||||
libs/mpf/include
|
||||
libs/mpf/src
|
||||
libs/mrcp/control/include
|
||||
libs/mrcp/control/src
|
||||
libs/mrcp/include
|
||||
libs/mrcp/message/include
|
||||
libs/mrcp/message/src
|
||||
libs/mrcp/resources/include
|
||||
libs/mrcp/resources/src
|
||||
libs/mrcp-client/include
|
||||
libs/mrcp-client/src
|
||||
libs/mrcp-server/include
|
||||
libs/mrcp-server/src
|
||||
libs/mrcp-engine/include
|
||||
libs/mrcp-engine/src
|
||||
libs/mrcp-signaling/include
|
||||
libs/mrcp-signaling/src
|
||||
libs/mrcpv2-transport/include
|
||||
libs/mrcpv2-transport/src
|
||||
libs/uni-rtsp/include
|
||||
libs/uni-rtsp/src
|
||||
modules/mrcp-sofiasip/include
|
||||
modules/mrcp-sofiasip/src
|
||||
modules/mrcp-unirtsp/include
|
||||
modules/mrcp-unirtsp/src
|
||||
platforms/libunimrcp-client/include
|
||||
platforms/libunimrcp-client/src
|
||||
platforms/libunimrcp-server/include
|
||||
platforms/libunimrcp-server/src
|
|
@ -0,0 +1,345 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="svnrev"
|
||||
ProjectGUID="{49AAB3FE-63D3-41CA-B92B-65828B79902B}"
|
||||
RootNamespace="svnrev"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
RuntimeLibrary="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
RuntimeLibrary="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\svnrev.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="prepare"
|
||||
ProjectGUID="{01D63BF5-7798-4746-852A-4B45229BB735}"
|
||||
RootNamespace="prepare"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -41,29 +41,6 @@
|
|||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
|
@ -74,7 +51,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -88,6 +65,29 @@
|
|||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
|
@ -99,7 +99,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="preparesphinx"
|
||||
ProjectGUID="{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}"
|
||||
RootNamespace="preparesphinx"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2008 Arsen Chaloyan
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -12,6 +12,8 @@
|
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: unimrcp_service.c 1474 2010-02-07 20:51:47Z achaloyan $
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
|
|
@ -1,158 +0,0 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="unimrcpservice"
|
||||
ProjectGUID="{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}"
|
||||
RootNamespace="unimrcpservice"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="unimrcpservice.exe.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
LinkTimeCodeGeneration="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="unimrcpservice.exe.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\unimrcp_service.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -51,7 +51,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
|
@ -113,7 +113,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
LinkTimeCodeGeneration="1"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -178,7 +178,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
|
@ -241,7 +241,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
LinkTimeCodeGeneration="1"
|
||||
/>
|
||||
<Tool
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2008 Arsen Chaloyan
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -12,10 +12,12 @@
|
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: uni_version.h 1724 2010-06-02 18:42:20Z achaloyan $
|
||||
*/
|
||||
|
||||
#ifndef __UNI_VERSION_H__
|
||||
#define __UNI_VERSION_H__
|
||||
#ifndef UNI_VERSION_H
|
||||
#define UNI_VERSION_H
|
||||
|
||||
/**
|
||||
* @file uni_version.h
|
||||
|
@ -26,20 +28,18 @@
|
|||
* http://apr.apache.org/versioning.html
|
||||
*/
|
||||
|
||||
#include <apr_version.h>
|
||||
|
||||
/** major version
|
||||
* Major API changes that could cause compatibility problems for older
|
||||
* programs such as structure size changes. No binary compatibility is
|
||||
* possible across a change in the major version.
|
||||
*/
|
||||
#define UNI_MAJOR_VERSION 0
|
||||
#define UNI_MAJOR_VERSION 1
|
||||
|
||||
/** minor version
|
||||
* Minor API changes that do not cause binary compatibility problems.
|
||||
* Reset to 0 when upgrading UNI_MAJOR_VERSION
|
||||
*/
|
||||
#define UNI_MINOR_VERSION 9
|
||||
#define UNI_MINOR_VERSION 0
|
||||
|
||||
/** patch level
|
||||
* The Patch Level never includes API changes, simply bug fixes.
|
||||
|
@ -57,10 +57,40 @@
|
|||
|| ((major) == UNI_MAJOR_VERSION && (minor) < UNI_MINOR_VERSION) \
|
||||
|| ((major) == UNI_MAJOR_VERSION && (minor) == UNI_MINOR_VERSION && (patch) <= UNI_PATCH_VERSION))
|
||||
|
||||
|
||||
/** Properly quote a value as a string in the C preprocessor */
|
||||
#define UNI_STRINGIFY(n) UNI_STRINGIFY_HELPER(n)
|
||||
/** Helper macro for UNI_STRINGIFY */
|
||||
#define UNI_STRINGIFY_HELPER(n) #n
|
||||
|
||||
/** The formatted string of UniMRCP's version */
|
||||
#define UNI_VERSION_STRING \
|
||||
APR_STRINGIFY(UNI_MAJOR_VERSION) "." \
|
||||
APR_STRINGIFY(UNI_MINOR_VERSION) "." \
|
||||
APR_STRINGIFY(UNI_PATCH_VERSION)
|
||||
UNI_STRINGIFY(UNI_MAJOR_VERSION) "." \
|
||||
UNI_STRINGIFY(UNI_MINOR_VERSION) "." \
|
||||
UNI_STRINGIFY(UNI_PATCH_VERSION)
|
||||
|
||||
#endif /* __UNI_VERSION_H__ */
|
||||
/** An alternative formatted string of UniMRCP's version
|
||||
macro for Win32 .rc files using numeric csv representation */
|
||||
#define UNI_VERSION_STRING_CSV UNI_MAJOR_VERSION ##, \
|
||||
##UNI_MINOR_VERSION ##, \
|
||||
##UNI_PATCH_VERSION
|
||||
|
||||
/** The Copyright */
|
||||
#define UNI_COPYRIGHT "Copyright 2008-2010 Arsen Chaloyan"
|
||||
|
||||
/** The License */
|
||||
#define UNI_LICENSE \
|
||||
"Licensed under the Apache License, Version 2.0 (the ""License"");" \
|
||||
"you may not use this file except in compliance with the License." \
|
||||
"You may obtain a copy of the License at" \
|
||||
"" \
|
||||
" http://www.apache.org/licenses/LICENSE-2.0" \
|
||||
"" \
|
||||
"Unless required by applicable law or agreed to in writing, software" \
|
||||
"distributed under the License is distributed on an ""AS IS"" BASIS," \
|
||||
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." \
|
||||
"See the License for the specific language governing permissions and" \
|
||||
"limitations under the License."
|
||||
|
||||
|
||||
#endif /* UNI_VERSION_H */
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<AprDir>$(LibRootDir)libs\apr</AprDir>
|
||||
<AprUtilDir>$(LibRootDir)libs\apr-util</AprUtilDir>
|
||||
<AprIconvDir>$(LibRootDir)libs\apr-iconv</AprIconvDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(AprDir)\include;$(AprUtilDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="AprDir">
|
||||
<Value>$(AprDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="AprUtilDir">
|
||||
<Value>$(AprUtilDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="AprIconvDir">
|
||||
<Value>$(AprIconvDir)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apr.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\apr-toolkit\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="cepstral"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(CepstralSDKDir)\include""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="swift.lib"
|
||||
AdditionalLibraryDirectories=""$(CepstralSDKDir)\lib\lib-windows""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="CepstralSDKDir"
|
||||
Value="C:\Program Files\Cepstral\sdk"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mpf\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp\include;$(ProjectRootDir)libs\mrcp\message\include;$(ProjectRootDir)libs\mrcp\control\include;$(ProjectRootDir)libs\mrcp\resources\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="mrcpsignaling.props" />
|
||||
<Import Project="mrcpv2transport.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="mpf.props" />
|
||||
<Import Project="mrcp.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-signaling\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="mrcp.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcpv2-transport\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<SofiaDir>$(LibRootDir)libs\sofia-sip</SofiaDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SofiaDir)\win32;$(SofiaDir)\libsofia-sip-ua\su;$(SofiaDir)\libsofia-sip-ua\nua;$(SofiaDir)\libsofia-sip-ua\url;$(SofiaDir)\libsofia-sip-ua\sip;$(SofiaDir)\libsofia-sip-ua\msg;$(SofiaDir)\libsofia-sip-ua\sdp;$(SofiaDir)\libsofia-sip-ua\nta;$(SofiaDir)\libsofia-sip-ua\nea;$(SofiaDir)\libsofia-sip-ua\soa;$(SofiaDir)\libsofia-sip-ua\iptsec;$(SofiaDir)\libsofia-sip-ua\bnf;$(SofiaDir)\libsofia-sip-ua\features;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="SofiaDir">
|
||||
<Value>$(SofiaDir)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<ProjectRootDir>$(ProjectDir)..\..\</ProjectRootDir>
|
||||
<LibRootDir>$(SolutionDir)</LibRootDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="ProjectRootDir">
|
||||
<Value>$(ProjectRootDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="LibRootDir">
|
||||
<Value>$(LibRootDir)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -11,6 +11,6 @@
|
|||
/>
|
||||
<UserMacro
|
||||
Name="UniMRCPClientLibs"
|
||||
Value="libunimrcpclient.lib mrcpclient.lib mrcpsignaling.lib mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
Value="libunimrcpclient.lib mrcpsofiasip.lib mrcpunirtsp.lib unirtsp.lib mrcpclient.lib mrcpv2transport.lib mrcpsignaling.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="unimrcpplugin"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugin"
|
||||
InheritedPropertySheets=".\mrcpengine.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories=""$(SolutionDir)$(ConfigurationName)\bin""
|
||||
AdditionalDependencies="mrcpengine.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib ws2_32.lib"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
|
@ -11,6 +11,6 @@
|
|||
/>
|
||||
<UserMacro
|
||||
Name="UniMRCPServerLibs"
|
||||
Value="libunimrcpserver.lib mrcpserver.lib mrcpsignaling.lib mrcpengine.lib mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
Value="libunimrcpserver.lib mrcpsofiasip.lib mrcpunirtsp.lib unirtsp.lib mrcpserver.lib mrcpv2transport.lib mrcpsignaling.lib mrcpengine.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\uni-rtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>RTSP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue