* #36737: switch back to svn repo, remove assert in sip_transaction.c
diff --git a/jni/pjproject-android/.svn/pristine/c4/c411c70bf90282c7382c2eea481fabe7eee90735.svn-base b/jni/pjproject-android/.svn/pristine/c4/c411c70bf90282c7382c2eea481fabe7eee90735.svn-base
new file mode 100644
index 0000000..5a30f70
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/c4/c411c70bf90282c7382c2eea481fabe7eee90735.svn-base
@@ -0,0 +1,506 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#ifndef __PJNATH_CONFIG_H__
+#define __PJNATH_CONFIG_H__
+
+
+/**
+ * @file config.h
+ * @brief Compile time settings
+ */
+
+#include <pj/types.h>
+
+/**
+ * @defgroup PJNATH_CONFIG Compile-time configurations
+ * @brief Various compile time settings
+ * @ingroup PJNATH_STUN_BASE
+ * @{
+ */
+
+
+/* **************************************************************************
+ * GENERAL
+ */
+
+/**
+ * The log level for PJNATH error display.
+ *
+ * default 1
+ */
+#ifndef PJNATH_ERROR_LEVEL
+#   define PJNATH_ERROR_LEVEL			    1
+#endif
+
+
+/* **************************************************************************
+ * STUN CONFIGURATION
+ */
+
+/**
+ * Maximum number of attributes in the STUN packet (for the new STUN
+ * library).
+ *
+ * Default: 16
+ */
+#ifndef PJ_STUN_MAX_ATTR
+#   define PJ_STUN_MAX_ATTR			    16
+#endif
+
+/**
+ * The default initial STUN round-trip time estimation (the RTO value
+ * in RFC 3489-bis), in miliseconds. 
+ * This value is used to control the STUN request 
+ * retransmit time. The initial value of retransmission interval 
+ * would be set to this value, and will be doubled after each
+ * retransmission.
+ */
+#ifndef PJ_STUN_RTO_VALUE
+#   define PJ_STUN_RTO_VALUE			    100
+#endif
+
+
+/**
+ * The STUN transaction timeout value, in miliseconds.
+ * After the last retransmission is sent and if no response is received 
+ * after this time, the STUN transaction will be considered to have failed.
+ *
+ * The default value is 16x RTO (as per RFC 3489-bis).
+ */
+#ifndef PJ_STUN_TIMEOUT_VALUE
+#   define PJ_STUN_TIMEOUT_VALUE		    (16 * PJ_STUN_RTO_VALUE)
+#endif
+
+
+/**
+ * Maximum number of STUN transmission count.
+ *
+ * Default: 7 (as per RFC 3489-bis)
+ */
+#ifndef PJ_STUN_MAX_TRANSMIT_COUNT
+#   define PJ_STUN_MAX_TRANSMIT_COUNT		    7
+#endif
+
+
+/**
+ * Duration to keep response in the cache, in msec.
+ *
+ * Default: 10000 (as per RFC 3489-bis)
+ */
+#ifndef PJ_STUN_RES_CACHE_DURATION
+#   define PJ_STUN_RES_CACHE_DURATION		    10000
+#endif
+
+
+/**
+ * Maximum size of STUN message.
+ */
+#ifndef PJ_STUN_MAX_PKT_LEN
+#   define PJ_STUN_MAX_PKT_LEN			    800
+#endif
+
+
+/**
+ * Default STUN port as defined by RFC 3489.
+ */
+#define PJ_STUN_PORT				    3478
+
+
+/**
+ * Padding character for string attributes.
+ *
+ * Default: ASCII 0
+ */
+#ifndef PJ_STUN_STRING_ATTR_PAD_CHR
+#   define PJ_STUN_STRING_ATTR_PAD_CHR		    0
+#endif
+
+
+/**
+ * Enable pre-RFC3489bis-07 style of STUN MESSAGE-INTEGRITY and FINGERPRINT
+ * calculation. By default this should be disabled since the calculation is
+ * not backward compatible with current STUN specification.
+ */
+#ifndef PJ_STUN_OLD_STYLE_MI_FINGERPRINT
+#   define PJ_STUN_OLD_STYLE_MI_FINGERPRINT	    0
+#endif
+
+
+/* **************************************************************************
+ * STUN TRANSPORT CONFIGURATION
+ */
+
+/**
+ * The packet buffer size for the STUN transport.
+ */
+#ifndef PJ_STUN_SOCK_PKT_LEN
+#   define PJ_STUN_SOCK_PKT_LEN			    2000
+#endif
+
+
+/**
+ * The duration of the STUN keep-alive period, in seconds.
+ */
+#ifndef PJ_STUN_KEEP_ALIVE_SEC
+#   define PJ_STUN_KEEP_ALIVE_SEC		    15
+#endif
+
+
+/* **************************************************************************
+ * TURN CONFIGURATION
+ */
+
+/**
+ * Maximum DNS SRV entries to be processed in the DNS SRV response
+ */
+#ifndef PJ_TURN_MAX_DNS_SRV_CNT
+#   define PJ_TURN_MAX_DNS_SRV_CNT		    4
+#endif
+
+
+/**
+ * Maximum TURN packet size to be supported.
+ */
+#ifndef PJ_TURN_MAX_PKT_LEN
+#   define PJ_TURN_MAX_PKT_LEN			    3000
+#endif
+
+
+/**
+ * The TURN permission lifetime setting. This value should be taken from the
+ * TURN protocol specification.
+ */
+#ifndef PJ_TURN_PERM_TIMEOUT
+#   define PJ_TURN_PERM_TIMEOUT			    300
+#endif
+
+
+/**
+ * The TURN channel binding lifetime. This value should be taken from the
+ * TURN protocol specification.
+ */
+#ifndef PJ_TURN_CHANNEL_TIMEOUT
+#   define PJ_TURN_CHANNEL_TIMEOUT		    600
+#endif
+
+
+/**
+ * Number of seconds to refresh the permission/channel binding before the 
+ * permission/channel binding expires. This value should be greater than 
+ * PJ_TURN_PERM_TIMEOUT setting.
+ */
+#ifndef PJ_TURN_REFRESH_SEC_BEFORE
+#   define PJ_TURN_REFRESH_SEC_BEFORE		    60
+#endif
+
+
+/**
+ * The TURN session timer heart beat interval. When this timer occurs, the 
+ * TURN session will scan all the permissions/channel bindings to see which
+ * need to be refreshed.
+ */
+#ifndef PJ_TURN_KEEP_ALIVE_SEC
+#   define PJ_TURN_KEEP_ALIVE_SEC		    15
+#endif
+
+
+/* **************************************************************************
+ * ICE CONFIGURATION
+ */
+
+/**
+ * Maximum number of ICE candidates.
+ *
+ * Default: 16
+ */
+#ifndef PJ_ICE_MAX_CAND
+#   define PJ_ICE_MAX_CAND			    16
+#endif
+
+
+/**
+ * Maximum number of candidates for each ICE stream transport component.
+ *
+ * Default: 8
+ */
+#ifndef PJ_ICE_ST_MAX_CAND
+#   define PJ_ICE_ST_MAX_CAND			    8
+#endif
+
+
+/**
+ * The number of bits to represent component IDs. This will affect
+ * the maximum number of components (PJ_ICE_MAX_COMP) value.
+ */
+#ifndef PJ_ICE_COMP_BITS
+#   define PJ_ICE_COMP_BITS			    1
+#endif
+
+
+/**
+ * Maximum number of ICE components.
+ */
+#define PJ_ICE_MAX_COMP				    (2<<PJ_ICE_COMP_BITS)
+
+/**
+ * Use the priority value according to the ice-draft.
+ */
+#ifndef PJNATH_ICE_PRIO_STD
+#   define PJNATH_ICE_PRIO_STD			    1
+#endif
+
+
+/**
+ * The number of bits to represent candidate type preference.
+ */
+#ifndef PJ_ICE_CAND_TYPE_PREF_BITS
+#   if PJNATH_ICE_PRIO_STD
+#	define PJ_ICE_CAND_TYPE_PREF_BITS	    8
+#   else
+#	define PJ_ICE_CAND_TYPE_PREF_BITS	    2
+#   endif
+#endif
+
+
+/**
+ * The number of bits to represent ICE candidate's local preference. The
+ * local preference is used to specify preference among candidates with
+ * the same type, and ICE draft suggests 65535 as the default local 
+ * preference, which means we need 16 bits to represent the value. But 
+ * since we don't have the facility to specify local preference, we'll
+ * just disable this feature and let the preference sorted by the 
+ * type only.
+ *
+ * Default: 0
+ */
+#ifndef PJ_ICE_LOCAL_PREF_BITS
+#   define PJ_ICE_LOCAL_PREF_BITS		    0
+#endif
+
+
+/**
+ * Maximum number of ICE checks.
+ *
+ * Default: 32
+ */
+#ifndef PJ_ICE_MAX_CHECKS
+#   define PJ_ICE_MAX_CHECKS			    32
+#endif
+
+
+/**
+ * Default timer interval (in miliseconds) for starting ICE periodic checks.
+ *
+ * Default: 20
+ */
+#ifndef PJ_ICE_TA_VAL
+#   define PJ_ICE_TA_VAL			    20
+#endif
+
+
+/**
+ * According to ICE Section 8.2. Updating States, if an In-Progress pair in 
+ * the check list is for the same component as a nominated pair, the agent 
+ * SHOULD cease retransmissions for its check if its pair priority is lower
+ * than the lowest priority nominated pair for that component.
+ *
+ * If a higher priority check is In Progress, this rule would cause that
+ * check to be performed even when it most likely will fail.
+ *
+ * The macro here controls if ICE session should cancel all In Progress 
+ * checks for the same component regardless of its priority.
+ *
+ * Default: 1 (yes, cancel all)
+ */
+#ifndef PJ_ICE_CANCEL_ALL
+#   define PJ_ICE_CANCEL_ALL			    1
+#endif
+
+
+/**
+ * For a controlled agent, specify how long it wants to wait (in milliseconds)
+ * for the controlling agent to complete sending connectivity check with
+ * nominated flag set to true for all components after the controlled agent
+ * has found that all connectivity checks in its checklist have been completed
+ * and there is at least one successful (but not nominated) check for every
+ * component.
+ *
+ * When selecting the value, bear in mind that the connectivity check from
+ * controlling agent may be delayed because of delay in receiving SDP answer
+ * from the controlled agent.
+ *
+ * Application may set this value to -1 to disable this timer.
+ *
+ * Default: 10000 (milliseconds)
+ */
+#ifndef ICE_CONTROLLED_AGENT_WAIT_NOMINATION_TIMEOUT
+#   define ICE_CONTROLLED_AGENT_WAIT_NOMINATION_TIMEOUT	10000
+#endif
+
+
+/**
+ * For controlling agent if it uses regular nomination, specify the delay to
+ * perform nominated check (connectivity check with USE-CANDIDATE attribute)
+ * after all components have a valid pair.
+ *
+ * Default: 4*PJ_STUN_RTO_VALUE (milliseconds)
+ */
+#ifndef PJ_ICE_NOMINATED_CHECK_DELAY
+#   define PJ_ICE_NOMINATED_CHECK_DELAY		    (4*PJ_STUN_RTO_VALUE)
+#endif
+
+
+/**
+ * Minimum interval value to be used for sending STUN keep-alive on the ICE
+ * session, in seconds. This minimum interval, plus a random value
+ * which maximum is PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND, specify the actual interval
+ * of the STUN keep-alive.
+ *
+ * Default: 15 seconds
+ *
+ * @see PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND
+ */
+#ifndef PJ_ICE_SESS_KEEP_ALIVE_MIN
+#   define PJ_ICE_SESS_KEEP_ALIVE_MIN		    20
+#endif
+
+/* Warn about deprecated macro */
+#ifdef PJ_ICE_ST_KEEP_ALIVE_MIN
+#   error PJ_ICE_ST_KEEP_ALIVE_MIN is deprecated
+#endif
+
+/**
+ * To prevent STUN keep-alives to be sent simultaneously, application should
+ * add random interval to minimum interval (PJ_ICE_SESS_KEEP_ALIVE_MIN). This
+ * setting specifies the maximum random value to be added to the minimum
+ * interval, in seconds.
+ *
+ * Default: 5 seconds
+ *
+ * @see PJ_ICE_SESS_KEEP_ALIVE_MIN
+ */
+#ifndef PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND
+#   define PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND	    5
+#endif
+
+/* Warn about deprecated macro */
+#ifdef PJ_ICE_ST_KEEP_ALIVE_MAX_RAND
+#   error PJ_ICE_ST_KEEP_ALIVE_MAX_RAND is deprecated
+#endif
+
+
+/**
+ * This constant specifies the length of random string generated for ICE
+ * ufrag and password.
+ *
+ * Default: 8 (characters)
+ */
+#ifndef PJ_ICE_UFRAG_LEN
+#   define PJ_ICE_UFRAG_LEN			    8
+#endif
+
+
+/** ICE session pool initial size. */
+#ifndef PJNATH_POOL_LEN_ICE_SESS
+#   define PJNATH_POOL_LEN_ICE_SESS		    512
+#endif
+
+/** ICE session pool increment size */
+#ifndef PJNATH_POOL_INC_ICE_SESS
+#   define PJNATH_POOL_INC_ICE_SESS		    512
+#endif
+
+/** ICE stream transport pool initial size. */
+#ifndef PJNATH_POOL_LEN_ICE_STRANS
+#   define PJNATH_POOL_LEN_ICE_STRANS		    1000
+#endif
+
+/** ICE stream transport pool increment size */
+#ifndef PJNATH_POOL_INC_ICE_STRANS
+#   define PJNATH_POOL_INC_ICE_STRANS		    512
+#endif
+
+/** NAT detect pool initial size */
+#ifndef PJNATH_POOL_LEN_NATCK
+#   define PJNATH_POOL_LEN_NATCK		    512
+#endif
+
+/** NAT detect pool increment size */
+#ifndef PJNATH_POOL_INC_NATCK
+#   define PJNATH_POOL_INC_NATCK		    512
+#endif
+
+/** STUN session pool initial size */
+#ifndef PJNATH_POOL_LEN_STUN_SESS
+#   define PJNATH_POOL_LEN_STUN_SESS		    1000
+#endif
+
+/** STUN session pool increment size */
+#ifndef PJNATH_POOL_INC_STUN_SESS
+#   define PJNATH_POOL_INC_STUN_SESS		    1000
+#endif
+
+/** STUN session transmit data pool initial size */
+#ifndef PJNATH_POOL_LEN_STUN_TDATA
+#   define PJNATH_POOL_LEN_STUN_TDATA		    1000
+#endif
+
+/** STUN session transmit data pool increment size */
+#ifndef PJNATH_POOL_INC_STUN_TDATA
+#   define PJNATH_POOL_INC_STUN_TDATA		    1000
+#endif
+
+/** TURN session initial pool size */
+#ifndef PJNATH_POOL_LEN_TURN_SESS
+#   define PJNATH_POOL_LEN_TURN_SESS		    1000
+#endif
+
+/** TURN session pool increment size */
+#ifndef PJNATH_POOL_INC_TURN_SESS
+#   define PJNATH_POOL_INC_TURN_SESS		    1000
+#endif
+
+/** TURN socket initial pool size */
+#ifndef PJNATH_POOL_LEN_TURN_SOCK
+#   define PJNATH_POOL_LEN_TURN_SOCK		    1000
+#endif
+
+/** TURN socket pool increment size */
+#ifndef PJNATH_POOL_INC_TURN_SOCK
+#   define PJNATH_POOL_INC_TURN_SOCK		    1000
+#endif
+
+/** Default STUN software name */
+#ifndef PJNATH_STUN_SOFTWARE_NAME
+#   define PJNATH_MAKE_SW_NAME(a,b,c,d)     "pjnath-" #a "." #b "." #c d
+#   define PJNATH_MAKE_SW_NAME2(a,b,c,d)    PJNATH_MAKE_SW_NAME(a,b,c,d)
+#   define PJNATH_STUN_SOFTWARE_NAME        PJNATH_MAKE_SW_NAME2( \
+						    PJ_VERSION_NUM_MAJOR, \
+						    PJ_VERSION_NUM_MINOR, \
+						    PJ_VERSION_NUM_REV, \
+						    PJ_VERSION_NUM_EXTRA)
+#endif
+
+/**
+ * @}
+ */
+
+#endif	/* __PJNATH_CONFIG_H__ */
+
diff --git a/jni/pjproject-android/.svn/pristine/c4/c435a143fc2f5a339762a16954c9064f7e3f5203.svn-base b/jni/pjproject-android/.svn/pristine/c4/c435a143fc2f5a339762a16954c9064f7e3f5203.svn-base
new file mode 100644
index 0000000..d38c36c
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/c4/c435a143fc2f5a339762a16954c9064f7e3f5203.svn-base
@@ -0,0 +1,239 @@
+/* Copyright (C) 2003 Jean-Marc Valin */
+/**
+   @file arch.h
+   @brief Various architecture definitions Speex
+*/
+/*
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+   
+   - Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+   
+   - Neither the name of the Xiph.org Foundation nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef ARCH_H
+#define ARCH_H
+
+#ifndef SPEEX_VERSION
+#define SPEEX_MAJOR_VERSION 1         /**< Major Speex version. */
+#define SPEEX_MINOR_VERSION 1         /**< Minor Speex version. */
+#define SPEEX_MICRO_VERSION 15        /**< Micro Speex version. */
+#define SPEEX_EXTRA_VERSION ""        /**< Extra Speex version. */
+#define SPEEX_VERSION "speex-1.2beta3"  /**< Speex version string. */
+#endif
+
+/* A couple test to catch stupid option combinations */
+#ifdef FIXED_POINT
+
+#ifdef FLOATING_POINT
+#error You cannot compile as floating point and fixed point at the same time
+#endif
+#ifdef _USE_SSE
+#error SSE is only for floating-point
+#endif
+#if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM))
+#error Make up your mind. What CPU do you have?
+#endif
+#ifdef VORBIS_PSYCHO
+#error Vorbis-psy model currently not implemented in fixed-point
+#endif
+
+#else
+
+#ifndef FLOATING_POINT
+#error You now need to define either FIXED_POINT or FLOATING_POINT
+#endif
+#if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
+#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
+#endif
+#ifdef FIXED_POINT_DEBUG
+#error "Don't you think enabling fixed-point is a good thing to do if you want to debug that?"
+#endif
+
+
+#endif
+
+#ifndef OUTSIDE_SPEEX
+#include "speex/speex_types.h"
+#endif
+
+#define ABS(x) ((x) < 0 ? (-(x)) : (x))      /**< Absolute integer value. */
+#define ABS16(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 16-bit value.  */
+#define MIN16(a,b) ((a) < (b) ? (a) : (b))   /**< Maximum 16-bit value.   */
+#define MAX16(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 16-bit value.   */
+#define ABS32(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 32-bit value.  */
+#define MIN32(a,b) ((a) < (b) ? (a) : (b))   /**< Maximum 32-bit value.   */
+#define MAX32(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 32-bit value.   */
+
+#ifdef FIXED_POINT
+
+typedef spx_int16_t spx_word16_t;
+typedef spx_int32_t   spx_word32_t;
+typedef spx_word32_t spx_mem_t;
+typedef spx_word16_t spx_coef_t;
+typedef spx_word16_t spx_lsp_t;
+typedef spx_word32_t spx_sig_t;
+
+#define Q15ONE 32767
+
+#define LPC_SCALING  8192
+#define SIG_SCALING  16384
+#define LSP_SCALING  8192.
+#define GAMMA_SCALING 32768.
+#define GAIN_SCALING 64
+#define GAIN_SCALING_1 0.015625
+
+#define LPC_SHIFT    13
+#define LSP_SHIFT    13
+#define SIG_SHIFT    14
+#define GAIN_SHIFT   6
+
+#define VERY_SMALL 0
+#define VERY_LARGE32 ((spx_word32_t)2147483647)
+#define VERY_LARGE16 ((spx_word16_t)32767)
+#define Q15_ONE ((spx_word16_t)32767)
+
+
+#ifdef FIXED_DEBUG
+#include "fixed_debug.h"
+#else
+
+#include "fixed_generic.h"
+
+#ifdef ARM5E_ASM
+#include "fixed_arm5e.h"
+#elif defined (ARM4_ASM)
+#include "fixed_arm4.h"
+#elif defined (BFIN_ASM)
+#include "fixed_bfin.h"
+#endif
+
+#endif
+
+
+#else
+
+typedef float spx_mem_t;
+typedef float spx_coef_t;
+typedef float spx_lsp_t;
+typedef float spx_sig_t;
+typedef float spx_word16_t;
+typedef float spx_word32_t;
+
+#define Q15ONE 1.0f
+#define LPC_SCALING  1.f
+#define SIG_SCALING  1.f
+#define LSP_SCALING  1.f
+#define GAMMA_SCALING 1.f
+#define GAIN_SCALING 1.f
+#define GAIN_SCALING_1 1.f
+
+
+#define VERY_SMALL 1e-15f
+#define VERY_LARGE32 1e15f
+#define VERY_LARGE16 1e15f
+#define Q15_ONE ((spx_word16_t)1.f)
+
+#define QCONST16(x,bits) (x)
+#define QCONST32(x,bits) (x)
+
+#define NEG16(x) (-(x))
+#define NEG32(x) (-(x))
+#define EXTRACT16(x) (x)
+#define EXTEND32(x) (x)
+#define SHR16(a,shift) (a)
+#define SHL16(a,shift) (a)
+#define SHR32(a,shift) (a)
+#define SHL32(a,shift) (a)
+#define PSHR16(a,shift) (a)
+#define PSHR32(a,shift) (a)
+#define VSHR32(a,shift) (a)
+#define SATURATE16(x,a) (x)
+#define SATURATE32(x,a) (x)
+
+#define PSHR(a,shift)       (a)
+#define SHR(a,shift)       (a)
+#define SHL(a,shift)       (a)
+#define SATURATE(x,a) (x)
+
+#define ADD16(a,b) ((a)+(b))
+#define SUB16(a,b) ((a)-(b))
+#define ADD32(a,b) ((a)+(b))
+#define SUB32(a,b) ((a)-(b))
+#define MULT16_16_16(a,b)     ((a)*(b))
+#define MULT16_16(a,b)     ((spx_word32_t)(a)*(spx_word32_t)(b))
+#define MAC16_16(c,a,b)     ((c)+(spx_word32_t)(a)*(spx_word32_t)(b))
+
+#define MULT16_32_Q11(a,b)     ((a)*(b))
+#define MULT16_32_Q13(a,b)     ((a)*(b))
+#define MULT16_32_Q14(a,b)     ((a)*(b))
+#define MULT16_32_Q15(a,b)     ((a)*(b))
+#define MULT16_32_P15(a,b)     ((a)*(b))
+
+#define MAC16_32_Q11(c,a,b)     ((c)+(a)*(b))
+#define MAC16_32_Q15(c,a,b)     ((c)+(a)*(b))
+
+#define MAC16_16_Q11(c,a,b)     ((c)+(a)*(b))
+#define MAC16_16_Q13(c,a,b)     ((c)+(a)*(b))
+#define MAC16_16_P13(c,a,b)     ((c)+(a)*(b))
+#define MULT16_16_Q11_32(a,b)     ((a)*(b))
+#define MULT16_16_Q13(a,b)     ((a)*(b))
+#define MULT16_16_Q14(a,b)     ((a)*(b))
+#define MULT16_16_Q15(a,b)     ((a)*(b))
+#define MULT16_16_P15(a,b)     ((a)*(b))
+#define MULT16_16_P13(a,b)     ((a)*(b))
+#define MULT16_16_P14(a,b)     ((a)*(b))
+
+#define DIV32_16(a,b)     (((spx_word32_t)(a))/(spx_word16_t)(b))
+#define PDIV32_16(a,b)     (((spx_word32_t)(a))/(spx_word16_t)(b))
+#define DIV32(a,b)     (((spx_word32_t)(a))/(spx_word32_t)(b))
+#define PDIV32(a,b)     (((spx_word32_t)(a))/(spx_word32_t)(b))
+
+
+#endif
+
+
+#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
+
+/* 2 on TI C5x DSP */
+#define BYTES_PER_CHAR 2 
+#define BITS_PER_CHAR 16
+#define LOG2_BITS_PER_CHAR 4
+
+#else 
+
+#define BYTES_PER_CHAR 1
+#define BITS_PER_CHAR 8
+#define LOG2_BITS_PER_CHAR 3
+
+#endif
+
+
+
+#ifdef FIXED_DEBUG
+extern long long spx_mips;
+#endif
+
+
+#endif
diff --git a/jni/pjproject-android/.svn/pristine/c4/c4ee6e26c89c4bc7240743679158ca7aed34fde1.svn-base b/jni/pjproject-android/.svn/pristine/c4/c4ee6e26c89c4bc7240743679158ca7aed34fde1.svn-base
new file mode 100644
index 0000000..97230f5
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/c4/c4ee6e26c89c4bc7240743679158ca7aed34fde1.svn-base
@@ -0,0 +1,632 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pjlib-util/scanner.h>
+#include <pj/ctype.h>
+#include <pj/string.h>
+#include <pj/except.h>
+#include <pj/os.h>
+#include <pj/errno.h>
+#include <pj/assert.h>
+
+#define PJ_SCAN_IS_SPACE(c)		((c)==' ' || (c)=='\t')
+#define PJ_SCAN_IS_NEWLINE(c)		((c)=='\r' || (c)=='\n')
+#define PJ_SCAN_IS_PROBABLY_SPACE(c)	((c) <= 32)
+#define PJ_SCAN_CHECK_EOF(s)		(s != scanner->end)
+
+
+#if defined(PJ_SCANNER_USE_BITWISE) && PJ_SCANNER_USE_BITWISE != 0
+#  include "scanner_cis_bitwise.c"
+#else
+#  include "scanner_cis_uint.c"
+#endif
+
+
+static void pj_scan_syntax_err(pj_scanner *scanner)
+{
+    (*scanner->callback)(scanner);
+}
+
+
+PJ_DEF(void) pj_cis_add_range(pj_cis_t *cis, int cstart, int cend)
+{
+    /* Can not set zero. This is the requirement of the parser. */
+    pj_assert(cstart > 0);
+
+    while (cstart != cend) {
+        PJ_CIS_SET(cis, cstart);
+	++cstart;
+    }
+}
+
+PJ_DEF(void) pj_cis_add_alpha(pj_cis_t *cis)
+{
+    pj_cis_add_range( cis, 'a', 'z'+1);
+    pj_cis_add_range( cis, 'A', 'Z'+1);
+}
+
+PJ_DEF(void) pj_cis_add_num(pj_cis_t *cis)
+{
+    pj_cis_add_range( cis, '0', '9'+1);
+}
+
+PJ_DEF(void) pj_cis_add_str( pj_cis_t *cis, const char *str)
+{
+    while (*str) {
+        PJ_CIS_SET(cis, *str);
+	++str;
+    }
+}
+
+PJ_DEF(void) pj_cis_add_cis( pj_cis_t *cis, const pj_cis_t *rhs)
+{
+    int i;
+    for (i=0; i<256; ++i) {
+	if (PJ_CIS_ISSET(rhs, i))
+	    PJ_CIS_SET(cis, i);
+    }
+}
+
+PJ_DEF(void) pj_cis_del_range( pj_cis_t *cis, int cstart, int cend)
+{
+    while (cstart != cend) {
+        PJ_CIS_CLR(cis, cstart);
+        cstart++;
+    }
+}
+
+PJ_DEF(void) pj_cis_del_str( pj_cis_t *cis, const char *str)
+{
+    while (*str) {
+        PJ_CIS_CLR(cis, *str);
+	++str;
+    }
+}
+
+PJ_DEF(void) pj_cis_invert( pj_cis_t *cis )
+{
+    unsigned i;
+    /* Can not set zero. This is the requirement of the parser. */
+    for (i=1; i<256; ++i) {
+	if (PJ_CIS_ISSET(cis,i))
+            PJ_CIS_CLR(cis,i);
+        else
+            PJ_CIS_SET(cis,i);
+    }
+}
+
+PJ_DEF(void) pj_scan_init( pj_scanner *scanner, char *bufstart, 
+			   pj_size_t buflen, unsigned options, 
+			   pj_syn_err_func_ptr callback )
+{
+    PJ_CHECK_STACK();
+
+    scanner->begin = scanner->curptr = bufstart;
+    scanner->end = bufstart + buflen;
+    scanner->line = 1;
+    scanner->start_line = scanner->begin;
+    scanner->callback = callback;
+    scanner->skip_ws = options;
+
+    if (scanner->skip_ws) 
+	pj_scan_skip_whitespace(scanner);
+}
+
+
+PJ_DEF(void) pj_scan_fini( pj_scanner *scanner )
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(scanner);
+}
+
+PJ_DEF(void) pj_scan_skip_whitespace( pj_scanner *scanner )
+{
+    register char *s = scanner->curptr;
+
+    while (PJ_SCAN_IS_SPACE(*s)) {
+	++s;
+    }
+
+    if (PJ_SCAN_IS_NEWLINE(*s) && (scanner->skip_ws & PJ_SCAN_AUTOSKIP_NEWLINE)) {
+	for (;;) {
+	    if (*s == '\r') {
+		++s;
+		if (*s == '\n') ++s;
+		++scanner->line;
+		scanner->curptr = scanner->start_line = s;
+	    } else if (*s == '\n') {
+		++s;
+		++scanner->line;
+		scanner->curptr = scanner->start_line = s;
+	    } else if (PJ_SCAN_IS_SPACE(*s)) {
+		do {
+		    ++s;
+		} while (PJ_SCAN_IS_SPACE(*s));
+	    } else {
+		break;
+	    }
+	}
+    }
+
+    if (PJ_SCAN_IS_NEWLINE(*s) && (scanner->skip_ws & PJ_SCAN_AUTOSKIP_WS_HEADER)==PJ_SCAN_AUTOSKIP_WS_HEADER) {
+	/* Check for header continuation. */
+	scanner->curptr = s;
+
+	if (*s == '\r') {
+	    ++s;
+	}
+	if (*s == '\n') {
+	    ++s;
+	}
+	scanner->start_line = s;
+
+	if (PJ_SCAN_IS_SPACE(*s)) {
+	    register char *t = s;
+	    do {
+		++t;
+	    } while (PJ_SCAN_IS_SPACE(*t));
+
+	    ++scanner->line;
+	    scanner->curptr = t;
+	}
+    } else {
+	scanner->curptr = s;
+    }
+}
+
+PJ_DEF(void) pj_scan_skip_line( pj_scanner *scanner )
+{
+    char *s = pj_ansi_strchr(scanner->curptr, '\n');
+    if (!s) {
+	scanner->curptr = scanner->end;
+    } else {
+	scanner->curptr = scanner->start_line = s+1;
+	scanner->line++;
+   }
+}
+
+PJ_DEF(int) pj_scan_peek( pj_scanner *scanner,
+			  const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+
+    /* Don't need to check EOF with PJ_SCAN_CHECK_EOF(s) */
+    while (pj_cis_match(spec, *s))
+	++s;
+
+    pj_strset3(out, scanner->curptr, s);
+    return *s;
+}
+
+
+PJ_DEF(int) pj_scan_peek_n( pj_scanner *scanner,
+			     pj_size_t len, pj_str_t *out)
+{
+    char *endpos = scanner->curptr + len;
+
+    if (endpos > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+
+    pj_strset(out, scanner->curptr, len);
+    return *endpos;
+}
+
+
+PJ_DEF(int) pj_scan_peek_until( pj_scanner *scanner,
+				const pj_cis_t *spec, 
+				pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+
+    while (PJ_SCAN_CHECK_EOF(s) && !pj_cis_match( spec, *s))
+	++s;
+
+    pj_strset3(out, scanner->curptr, s);
+    return *s;
+}
+
+
+PJ_DEF(void) pj_scan_get( pj_scanner *scanner,
+			  const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    pj_assert(pj_cis_match(spec,0)==0);
+
+    /* EOF is detected implicitly */
+    if (!pj_cis_match(spec, *s)) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    do {
+	++s;
+    } while (pj_cis_match(spec, *s));
+    /* No need to check EOF here (PJ_SCAN_CHECK_EOF(s)) because
+     * buffer is NULL terminated and pj_cis_match(spec,0) should be
+     * false.
+     */
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);    
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_unescape( pj_scanner *scanner,
+				   const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+    char *dst = s;
+
+    pj_assert(pj_cis_match(spec,0)==0);
+
+    /* Must not match character '%' */
+    pj_assert(pj_cis_match(spec,'%')==0);
+
+    /* EOF is detected implicitly */
+    if (!pj_cis_match(spec, *s) && *s != '%') {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    out->ptr = s;
+    do {
+	if (*s == '%') {
+	    if (s+3 <= scanner->end && pj_isxdigit(*(s+1)) && 
+		pj_isxdigit(*(s+2))) 
+	    {
+		*dst = (pj_uint8_t) ((pj_hex_digit_to_val(*(s+1)) << 4) +
+				      pj_hex_digit_to_val(*(s+2)));
+		++dst;
+		s += 3;
+	    } else {
+		*dst++ = *s++;
+		*dst++ = *s++;
+		break;
+	    }
+	}
+	
+	if (pj_cis_match(spec, *s)) {
+	    char *start = s;
+	    do {
+		++s;
+	    } while (pj_cis_match(spec, *s));
+
+	    if (dst != start) pj_memmove(dst, start, s-start);
+	    dst += (s-start);
+	} 
+	
+    } while (*s == '%');
+
+    scanner->curptr = s;
+    out->slen = (dst - out->ptr);
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);    
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_quote( pj_scanner *scanner,
+				int begin_quote, int end_quote, 
+				pj_str_t *out)
+{
+    char beg = (char)begin_quote;
+    char end = (char)end_quote;
+    pj_scan_get_quotes(scanner, &beg, &end, 1, out);
+}
+
+PJ_DEF(void) pj_scan_get_quotes(pj_scanner *scanner,
+                                const char *begin_quote, const char *end_quote,
+                                int qsize, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+    int qpair = -1;
+    int i;
+
+    pj_assert(qsize > 0);
+
+    /* Check and eat the begin_quote. */
+    for (i = 0; i < qsize; ++i) {
+	if (*s == begin_quote[i]) {
+	    qpair = i;
+	    break;
+	}
+    }
+    if (qpair == -1) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+    ++s;
+
+    /* Loop until end_quote is found. 
+     */
+    do {
+	/* loop until end_quote is found. */
+	while (PJ_SCAN_CHECK_EOF(s) && *s != '\n' && *s != end_quote[qpair]) {
+	    ++s;
+	}
+
+	/* check that no backslash character precedes the end_quote. */
+	if (*s == end_quote[qpair]) {
+	    if (*(s-1) == '\\') {
+		char *q = s-2;
+		char *r = s-2;
+
+		while (r != scanner->begin && *r == '\\') {
+		    --r;
+		}
+		/* break from main loop if we have odd number of backslashes */
+		if (((unsigned)(q-r) & 0x01) == 1) {
+		    break;
+		}
+		++s;
+	    } else {
+		/* end_quote is not preceeded by backslash. break now. */
+		break;
+	    }
+	} else {
+	    /* loop ended by non-end_quote character. break now. */
+	    break;
+	}
+    } while (1);
+
+    /* Check and eat the end quote. */
+    if (*s != end_quote[qpair]) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+    ++s;
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_n( pj_scanner *scanner,
+			    unsigned N, pj_str_t *out)
+{
+    if (scanner->curptr + N > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    pj_strset(out, scanner->curptr, N);
+    
+    scanner->curptr += N;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(int) pj_scan_get_char( pj_scanner *scanner )
+{
+    int chr = *scanner->curptr;
+
+    if (!chr) {
+	pj_scan_syntax_err(scanner);
+	return 0;
+    }
+
+    ++scanner->curptr;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+    return chr;
+}
+
+
+PJ_DEF(void) pj_scan_get_newline( pj_scanner *scanner )
+{
+    if (!PJ_SCAN_IS_NEWLINE(*scanner->curptr)) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    if (*scanner->curptr == '\r') {
+	++scanner->curptr;
+    }
+    if (*scanner->curptr == '\n') {
+	++scanner->curptr;
+    }
+
+    ++scanner->line;
+    scanner->start_line = scanner->curptr;
+
+    /**
+     * This probably is a bug, see PROTOS test #2480.
+     * This would cause scanner to incorrectly eat two new lines, e.g.
+     * when parsing:
+     *   
+     *	Content-Length: 120\r\n
+     *	\r\n
+     *	<space><space><space>...
+     *
+     * When pj_scan_get_newline() is called to parse the first newline
+     * in the Content-Length header, it will eat the second newline
+     * too because it thinks that it's a header continuation.
+     *
+     * if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
+     *    pj_scan_skip_whitespace(scanner);
+     * }
+     */
+}
+
+
+PJ_DEF(void) pj_scan_get_until( pj_scanner *scanner,
+				const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    while (PJ_SCAN_CHECK_EOF(s) && !pj_cis_match(spec, *s)) {
+	++s;
+    }
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_until_ch( pj_scanner *scanner, 
+				   int until_char, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    while (PJ_SCAN_CHECK_EOF(s) && *s != until_char) {
+	++s;
+    }
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_until_chr( pj_scanner *scanner,
+				     const char *until_spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+    pj_size_t speclen;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    speclen = strlen(until_spec);
+    while (PJ_SCAN_CHECK_EOF(s) && !memchr(until_spec, *s, speclen)) {
+	++s;
+    }
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+PJ_DEF(void) pj_scan_advance_n( pj_scanner *scanner,
+				 unsigned N, pj_bool_t skip_ws)
+{
+    if (scanner->curptr + N > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    scanner->curptr += N;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(int) pj_scan_strcmp( pj_scanner *scanner, const char *s, int len)
+{
+    if (scanner->curptr + len > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+    return strncmp(scanner->curptr, s, len);
+}
+
+
+PJ_DEF(int) pj_scan_stricmp( pj_scanner *scanner, const char *s, int len)
+{
+    if (scanner->curptr + len > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+    return pj_ansi_strnicmp(scanner->curptr, s, len);
+}
+
+PJ_DEF(int) pj_scan_stricmp_alnum( pj_scanner *scanner, const char *s, 
+				   int len)
+{
+    if (scanner->curptr + len > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+    return strnicmp_alnum(scanner->curptr, s, len);
+}
+
+PJ_DEF(void) pj_scan_save_state( const pj_scanner *scanner, 
+				 pj_scan_state *state)
+{
+    state->curptr = scanner->curptr;
+    state->line = scanner->line;
+    state->start_line = scanner->start_line;
+}
+
+
+PJ_DEF(void) pj_scan_restore_state( pj_scanner *scanner, 
+				    pj_scan_state *state)
+{
+    scanner->curptr = state->curptr;
+    scanner->line = state->line;
+    scanner->start_line = state->start_line;
+}
+
+