activesock.h   activesock.h 
/* $Id: activesock.h 4359 2013-02-21 11:18:36Z bennylp $ */ /* $Id: activesock.h 4461 2013-04-05 03:02:19Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 134 skipping to change at line 134
* *
* @return Application may destroy the active socket in the * @return Application may destroy the active socket in the
* callback and return PJ_FALSE here. * callback and return PJ_FALSE here.
*/ */
pj_bool_t (*on_data_sent)(pj_activesock_t *asock, pj_bool_t (*on_data_sent)(pj_activesock_t *asock,
pj_ioqueue_op_key_t *send_key, pj_ioqueue_op_key_t *send_key,
pj_ssize_t sent); pj_ssize_t sent);
/** /**
* This callback is called when new connection arrives as the result * This callback is called when new connection arrives as the result
* of pj_activesock_start_accept(). * of pj_activesock_start_accept(). If the status of accept operation i
s
* needed use on_accept_complete2 instead of this callback.
* *
* @param asock The active socket. * @param asock The active socket.
* @param newsock The new incoming socket. * @param newsock The new incoming socket.
* @param src_addr The source address of the connection. * @param src_addr The source address of the connection.
* @param addr_len Length of the source address. * @param addr_len Length of the source address.
* *
* @return PJ_TRUE if further accept() is desired, and PJ_FALSE * @return PJ_TRUE if further accept() is desired, and PJ_FALSE
* when application no longer wants to accept incoming * when application no longer wants to accept incoming
* connection. Application may destroy the active socke t * connection. Application may destroy the active socke t
* in the callback and return PJ_FALSE here. * in the callback and return PJ_FALSE here.
*/ */
pj_bool_t (*on_accept_complete)(pj_activesock_t *asock, pj_bool_t (*on_accept_complete)(pj_activesock_t *asock,
pj_sock_t newsock, pj_sock_t newsock,
const pj_sockaddr_t *src_addr, const pj_sockaddr_t *src_addr,
int src_addr_len); int src_addr_len);
/** /**
* This callback is called when new connection arrives as the result
* of pj_activesock_start_accept().
*
* @param asock The active socket.
* @param newsock The new incoming socket.
* @param src_addr The source address of the connection.
* @param addr_len Length of the source address.
* @param status The status of the accept operation. This may contain
* non-PJ_SUCCESS for example when the TCP listener is
in
* bad state for example on iOS platform after the
* application waking up from background.
*
* @return PJ_TRUE if further accept() is desired, and PJ_FALSE
* when application no longer wants to accept incoming
* connection. Application may destroy the active socke
t
* in the callback and return PJ_FALSE here.
*/
pj_bool_t (*on_accept_complete2)(pj_activesock_t *asock,
pj_sock_t newsock,
const pj_sockaddr_t *src_addr,
int src_addr_len,
pj_status_t status);
/**
* This callback is called when pending connect operation has been * This callback is called when pending connect operation has been
* completed. * completed.
* *
* @param asock The active socket. * @param asock The active socket.
* @param status The connection result. If connection has been * @param status The connection result. If connection has been
* successfully established, the status will contain * successfully established, the status will contain
* PJ_SUCCESS. * PJ_SUCCESS.
* *
* @return Application may destroy the active socket in the * @return Application may destroy the active socket in the
* callback and return PJ_FALSE here. * callback and return PJ_FALSE here.
 End of changes. 3 change blocks. 
2 lines changed or deleted 30 lines changed or added


 cc_armcc.h   cc_armcc.h 
/* $Id: cc_armcc.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: cc_armcc.h 4624 2013-10-21 06:37:30Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 46 skipping to change at line 46
#ifdef __cplusplus #ifdef __cplusplus
# define PJ_INLINE_SPECIFIER inline # define PJ_INLINE_SPECIFIER inline
#else #else
# define PJ_INLINE_SPECIFIER static __inline # define PJ_INLINE_SPECIFIER static __inline
#endif #endif
#define PJ_THREAD_FUNC #define PJ_THREAD_FUNC
#define PJ_NORETURN #define PJ_NORETURN
#define PJ_ATTR_NORETURN __attribute__ ((noreturn)) #define PJ_ATTR_NORETURN __attribute__ ((noreturn))
#define PJ_ATTR_MAY_ALIAS __attribute__ ((__may_alias__))
#define PJ_HAS_INT64 1 #define PJ_HAS_INT64 1
typedef long long pj_int64_t; typedef long long pj_int64_t;
typedef unsigned long long pj_uint64_t; typedef unsigned long long pj_uint64_t;
#define PJ_INT64_FMT "L" #define PJ_INT64_FMT "L"
#define PJ_UNREACHED(x) #define PJ_UNREACHED(x)
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 cc_codew.h   cc_codew.h 
/* $Id: cc_codew.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: cc_codew.h 4624 2013-10-21 06:37:30Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 41 skipping to change at line 41
#define PJ_CC_NAME "codewarrior" #define PJ_CC_NAME "codewarrior"
#define PJ_CC_VER_1 ((__MWERKS__ & 0xF000) >> 12) #define PJ_CC_VER_1 ((__MWERKS__ & 0xF000) >> 12)
#define PJ_CC_VER_2 ((__MWERKS__ & 0x0F00) >> 8) #define PJ_CC_VER_2 ((__MWERKS__ & 0x0F00) >> 8)
#define PJ_CC_VER_3 ((__MWERKS__ & 0xFF)) #define PJ_CC_VER_3 ((__MWERKS__ & 0xFF))
#define PJ_INLINE_SPECIFIER static inline #define PJ_INLINE_SPECIFIER static inline
#define PJ_THREAD_FUNC #define PJ_THREAD_FUNC
#define PJ_NORETURN #define PJ_NORETURN
#define PJ_ATTR_NORETURN #define PJ_ATTR_NORETURN
#define PJ_ATTR_MAY_ALIAS
#define PJ_HAS_INT64 1 #define PJ_HAS_INT64 1
typedef long long pj_int64_t; typedef long long pj_int64_t;
typedef unsigned long long pj_uint64_t; typedef unsigned long long pj_uint64_t;
#define PJ_INT64(val) val##LL #define PJ_INT64(val) val##LL
#define PJ_UINT64(val) val##LLU #define PJ_UINT64(val) val##LLU
#define PJ_INT64_FMT "L" #define PJ_INT64_FMT "L"
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 cc_gcc.h   cc_gcc.h 
/* $Id: cc_gcc.h 3664 2011-07-19 03:42:28Z nanang $ */ /* $Id: cc_gcc.h 4704 2014-01-16 05:30:46Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 54 skipping to change at line 54
#define PJ_NORETURN #define PJ_NORETURN
#define PJ_HAS_INT64 1 #define PJ_HAS_INT64 1
#ifdef __STRICT_ANSI__ #ifdef __STRICT_ANSI__
#include <inttypes.h> #include <inttypes.h>
typedef int64_t pj_int64_t; typedef int64_t pj_int64_t;
typedef uint64_t pj_uint64_t; typedef uint64_t pj_uint64_t;
#define PJ_INLINE_SPECIFIER static __inline #define PJ_INLINE_SPECIFIER static __inline
#define PJ_ATTR_NORETURN #define PJ_ATTR_NORETURN
#define PJ_ATTR_MAY_ALIAS
#else #else
typedef long long pj_int64_t; typedef long long pj_int64_t;
typedef unsigned long long pj_uint64_t; typedef unsigned long long pj_uint64_t;
#define PJ_INLINE_SPECIFIER static inline #define PJ_INLINE_SPECIFIER static inline
#define PJ_ATTR_NORETURN __attribute__ ((noreturn)) #define PJ_ATTR_NORETURN __attribute__ ((noreturn))
#define PJ_ATTR_MAY_ALIAS __attribute__((__may_alias__))
#endif #endif
#define PJ_INT64(val) val##LL #define PJ_INT64(val) val##LL
#define PJ_UINT64(val) val##LLU #define PJ_UINT64(val) val##ULL
#define PJ_INT64_FMT "L" #define PJ_INT64_FMT "L"
#ifdef __GLIBC__ #ifdef __GLIBC__
# define PJ_HAS_BZERO 1 # define PJ_HAS_BZERO 1
#endif #endif
#define PJ_UNREACHED(x) #define PJ_UNREACHED(x)
#define PJ_ALIGN_DATA(declaration, alignment) declaration __attribute__((al igned (alignment))) #define PJ_ALIGN_DATA(declaration, alignment) declaration __attribute__((al igned (alignment)))
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added


 cc_gcce.h   cc_gcce.h 
/* $Id: cc_gcce.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: cc_gcce.h 4624 2013-10-21 06:37:30Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 41 skipping to change at line 41
#define PJ_CC_NAME "gcce" #define PJ_CC_NAME "gcce"
#define PJ_CC_VER_1 __GCCE__ #define PJ_CC_VER_1 __GCCE__
#define PJ_CC_VER_2 __GCCE_MINOR__ #define PJ_CC_VER_2 __GCCE_MINOR__
#define PJ_CC_VER_3 __GCCE_PATCHLEVEL__ #define PJ_CC_VER_3 __GCCE_PATCHLEVEL__
#define PJ_INLINE_SPECIFIER static inline #define PJ_INLINE_SPECIFIER static inline
#define PJ_THREAD_FUNC #define PJ_THREAD_FUNC
#define PJ_NORETURN #define PJ_NORETURN
#define PJ_ATTR_NORETURN __attribute__ ((noreturn)) #define PJ_ATTR_NORETURN __attribute__ ((noreturn))
#define PJ_ATTR_MAY_ALIAS __attribute__ ((__may_alias__))
#define PJ_HAS_INT64 1 #define PJ_HAS_INT64 1
typedef long long pj_int64_t; typedef long long pj_int64_t;
typedef unsigned long long pj_uint64_t; typedef unsigned long long pj_uint64_t;
#define PJ_INT64(val) val##LL #define PJ_INT64(val) val##LL
#define PJ_UINT64(val) val##LLU #define PJ_UINT64(val) val##LLU
#define PJ_INT64_FMT "L" #define PJ_INT64_FMT "L"
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 cc_msvc.h   cc_msvc.h 
/* $Id: cc_msvc.h 3664 2011-07-19 03:42:28Z nanang $ */ /* $Id: cc_msvc.h 4624 2013-10-21 06:37:30Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 71 skipping to change at line 71
# define PJ_INLINE_SPECIFIER static __inline # define PJ_INLINE_SPECIFIER static __inline
#endif #endif
#define PJ_EXPORT_DECL_SPECIFIER __declspec(dllexport) #define PJ_EXPORT_DECL_SPECIFIER __declspec(dllexport)
#define PJ_EXPORT_DEF_SPECIFIER __declspec(dllexport) #define PJ_EXPORT_DEF_SPECIFIER __declspec(dllexport)
#define PJ_IMPORT_DECL_SPECIFIER __declspec(dllimport) #define PJ_IMPORT_DECL_SPECIFIER __declspec(dllimport)
#define PJ_THREAD_FUNC #define PJ_THREAD_FUNC
#define PJ_NORETURN __declspec(noreturn) #define PJ_NORETURN __declspec(noreturn)
#define PJ_ATTR_NORETURN #define PJ_ATTR_NORETURN
#define PJ_ATTR_MAY_ALIAS
#define PJ_HAS_INT64 1 #define PJ_HAS_INT64 1
typedef __int64 pj_int64_t; typedef __int64 pj_int64_t;
typedef unsigned __int64 pj_uint64_t; typedef unsigned __int64 pj_uint64_t;
#define PJ_INT64(val) val##i64 #define PJ_INT64(val) val##i64
#define PJ_UINT64(val) val##ui64 #define PJ_UINT64(val) val##ui64
#define PJ_INT64_FMT "I64" #define PJ_INT64_FMT "I64"
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 cc_mwcc.h   cc_mwcc.h 
/* $Id: cc_mwcc.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: cc_mwcc.h 4624 2013-10-21 06:37:30Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 41 skipping to change at line 41
#define PJ_CC_NAME "mwcc32sym" #define PJ_CC_NAME "mwcc32sym"
#define PJ_CC_VER_1 1 #define PJ_CC_VER_1 1
#define PJ_CC_VER_2 0 #define PJ_CC_VER_2 0
#define PJ_CC_VER_3 0 #define PJ_CC_VER_3 0
#define PJ_INLINE_SPECIFIER static inline #define PJ_INLINE_SPECIFIER static inline
#define PJ_THREAD_FUNC #define PJ_THREAD_FUNC
#define PJ_NORETURN #define PJ_NORETURN
#define PJ_ATTR_NORETURN __attribute__ ((noreturn)) #define PJ_ATTR_NORETURN __attribute__ ((noreturn))
#define PJ_ATTR_MAY_ALIAS
#define PJ_HAS_INT64 1 #define PJ_HAS_INT64 1
typedef long long pj_int64_t; typedef long long pj_int64_t;
typedef unsigned long long pj_uint64_t; typedef unsigned long long pj_uint64_t;
#define PJ_INT64(val) val##LL #define PJ_INT64(val) val##LL
#define PJ_UINT64(val) val##LLU #define PJ_UINT64(val) val##LLU
#define PJ_INT64_FMT "L" #define PJ_INT64_FMT "L"
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 circbuf.h   circbuf.h 
/* $Id: circbuf.h 3664 2011-07-19 03:42:28Z nanang $ */ /* $Id: circbuf.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 212 skipping to change at line 212
*/ */
PJ_INLINE(void) pjmedia_circ_buf_get_read_regions(pjmedia_circ_buf *circbuf , PJ_INLINE(void) pjmedia_circ_buf_get_read_regions(pjmedia_circ_buf *circbuf ,
pj_int16_t **reg1, pj_int16_t **reg1,
unsigned *reg1_len, unsigned *reg1_len,
pj_int16_t **reg2, pj_int16_t **reg2,
unsigned *reg2_len) unsigned *reg2_len)
{ {
*reg1 = circbuf->start; *reg1 = circbuf->start;
*reg1_len = circbuf->len; *reg1_len = circbuf->len;
if (*reg1 + *reg1_len > circbuf->buf + circbuf->capacity) { if (*reg1 + *reg1_len > circbuf->buf + circbuf->capacity) {
*reg1_len = circbuf->buf + circbuf->capacity - circbuf->start; *reg1_len = (unsigned)(circbuf->buf + circbuf->capacity -
circbuf->start);
*reg2 = circbuf->buf; *reg2 = circbuf->buf;
*reg2_len = circbuf->len - *reg1_len; *reg2_len = circbuf->len - *reg1_len;
} else { } else {
*reg2 = NULL; *reg2 = NULL;
*reg2_len = 0; *reg2_len = 0;
} }
PJMEDIA_CIRC_BUF_CHECK(*reg1_len != 0 || (*reg1_len == 0 && PJMEDIA_CIRC_BUF_CHECK(*reg1_len != 0 || (*reg1_len == 0 &&
circbuf->len == 0)); circbuf->len == 0));
PJMEDIA_CIRC_BUF_CHECK(*reg1_len + *reg2_len == circbuf->len); PJMEDIA_CIRC_BUF_CHECK(*reg1_len + *reg2_len == circbuf->len);
skipping to change at line 247 skipping to change at line 248
pj_int16_t **reg1, pj_int16_t **reg1,
unsigned *reg1_len, unsigned *reg1_len,
pj_int16_t **reg2, pj_int16_t **reg2,
unsigned *reg2_len) unsigned *reg2_len)
{ {
*reg1 = circbuf->start + circbuf->len; *reg1 = circbuf->start + circbuf->len;
if (*reg1 >= circbuf->buf + circbuf->capacity) if (*reg1 >= circbuf->buf + circbuf->capacity)
*reg1 -= circbuf->capacity; *reg1 -= circbuf->capacity;
*reg1_len = circbuf->capacity - circbuf->len; *reg1_len = circbuf->capacity - circbuf->len;
if (*reg1 + *reg1_len > circbuf->buf + circbuf->capacity) { if (*reg1 + *reg1_len > circbuf->buf + circbuf->capacity) {
*reg1_len = circbuf->buf + circbuf->capacity - *reg1; *reg1_len = (unsigned)(circbuf->buf + circbuf->capacity - *reg1);
*reg2 = circbuf->buf; *reg2 = circbuf->buf;
*reg2_len = circbuf->start - circbuf->buf; *reg2_len = (unsigned)(circbuf->start - circbuf->buf);
} else { } else {
*reg2 = NULL; *reg2 = NULL;
*reg2_len = 0; *reg2_len = 0;
} }
PJMEDIA_CIRC_BUF_CHECK(*reg1_len != 0 || (*reg1_len == 0 && PJMEDIA_CIRC_BUF_CHECK(*reg1_len != 0 || (*reg1_len == 0 &&
circbuf->len == 0)); circbuf->len == 0));
PJMEDIA_CIRC_BUF_CHECK(*reg1_len + *reg2_len == circbuf->capacity - PJMEDIA_CIRC_BUF_CHECK(*reg1_len + *reg2_len == circbuf->capacity -
circbuf->len); circbuf->len);
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 5 lines changed or added


 config.h   config.h 
/* $Id: config.h 4415 2013-03-05 08:34:45Z ming $ */ /* $Id: config.h 4764 2014-02-27 02:13:25Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 79 skipping to change at line 79
* Windows CE * Windows CE
*/ */
# undef PJ_WIN32_WINCE # undef PJ_WIN32_WINCE
# define PJ_WIN32_WINCE 1 # define PJ_WIN32_WINCE 1
# include <pj/compat/os_win32_wince.h> # include <pj/compat/os_win32_wince.h>
/* Also define Win32 */ /* Also define Win32 */
# define PJ_WIN32 1 # define PJ_WIN32 1
#elif defined(PJ_WIN32) || defined(_WIN32) || defined(__WIN32__) || \ #elif defined(PJ_WIN32) || defined(_WIN32) || defined(__WIN32__) || \
defined(_WIN64) || defined(WIN32) || defined(__TOS_WIN__) defined(WIN32) || defined(PJ_WIN64) || defined(_WIN64) || \
/* defined(WIN64) || defined(__TOS_WIN__)
* Win32 # if defined(PJ_WIN64) || defined(_WIN64) || defined(WIN64)
*/ /*
* Win64
*/
# undef PJ_WIN64
# define PJ_WIN64 1
# endif
# undef PJ_WIN32 # undef PJ_WIN32
# define PJ_WIN32 1 # define PJ_WIN32 1
# include <pj/compat/os_win32.h> # include <pj/compat/os_win32.h>
#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0 #elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0
/* /*
* Linux kernel * Linux kernel
*/ */
# include <pj/compat/os_linux_kernel.h> # include <pj/compat/os_linux_kernel.h>
skipping to change at line 1146 skipping to change at line 1151
#if !defined(PJ_THREAD_ALLOCATE_STACK) #if !defined(PJ_THREAD_ALLOCATE_STACK)
# error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h" # error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
#endif #endif
PJ_BEGIN_DECL PJ_BEGIN_DECL
/** PJLIB version major number. */ /** PJLIB version major number. */
#define PJ_VERSION_NUM_MAJOR 2 #define PJ_VERSION_NUM_MAJOR 2
/** PJLIB version minor number. */ /** PJLIB version minor number. */
#define PJ_VERSION_NUM_MINOR 1 #define PJ_VERSION_NUM_MINOR 2
/** PJLIB version revision number. */ /** PJLIB version revision number. */
#define PJ_VERSION_NUM_REV 0 #define PJ_VERSION_NUM_REV 0
/** /**
* Extra suffix for the version (e.g. "-trunk"), or empty for * Extra suffix for the version (e.g. "-trunk"), or empty for
* web release version. * web release version.
*/ */
#define PJ_VERSION_NUM_EXTRA "" #define PJ_VERSION_NUM_EXTRA ""
 End of changes. 3 change blocks. 
6 lines changed or deleted 11 lines changed or added


 config_site_sample.h   config_site_sample.h 
skipping to change at line 358 skipping to change at line 358
/* Other pjsua settings */ /* Other pjsua settings */
#define PJSUA_MAX_ACC 4 #define PJSUA_MAX_ACC 4
#define PJSUA_MAX_PLAYERS 4 #define PJSUA_MAX_PLAYERS 4
#define PJSUA_MAX_RECORDERS 4 #define PJSUA_MAX_RECORDERS 4
#define PJSUA_MAX_CONF_PORTS (PJSUA_MAX_CALLS+2*PJSUA_MAX _PLAYERS) #define PJSUA_MAX_CONF_PORTS (PJSUA_MAX_CALLS+2*PJSUA_MAX _PLAYERS)
#define PJSUA_MAX_BUDDIES 32 #define PJSUA_MAX_BUDDIES 32
#endif #endif
/* /*
* Android sample settings.
*/
#if PJ_CONFIG_ANDROID
#define PJ_ANDROID 1
/*
* PJLIB settings.
*/
/* Disable floating point support */
#undef PJ_HAS_FLOATING_POINT
#define PJ_HAS_FLOATING_POINT 0
/*
* PJMEDIA settings
*/
/* We have our own OpenSL ES backend */
#define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0
#define PJMEDIA_AUDIO_DEV_HAS_WMME 0
#define PJMEDIA_AUDIO_DEV_HAS_OPENSL 1
#define PJMEDIA_AUDIO_DEV_HAS_ANDROID_JNI 0
/* Disable some codecs */
#define PJMEDIA_HAS_L16_CODEC 0
#define PJMEDIA_HAS_G722_CODEC 0
/* Fine tune Speex's default settings for best performance/quality */
#define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 5
/*
* PJSIP settings.
*/
/* Increase allowable packet size, just in case */
//#define PJSIP_MAX_PKT_LEN 2000
/*
* PJSUA settings.
*/
/* Default codec quality, previously was set to 5, however it is now
* set to 4 to make sure pjsua instantiates resampler with small filter
.
*/
#define PJSUA_DEFAULT_CODEC_QUALITY 4
/* Set maximum number of dialog/transaction/calls to minimum */
#define PJSIP_MAX_TSX_COUNT 31
#define PJSIP_MAX_DIALOG_COUNT 31
#define PJSUA_MAX_CALLS 4
/* Other pjsua settings */
#define PJSUA_MAX_ACC 4
#define PJSUA_MAX_PLAYERS 4
#define PJSUA_MAX_RECORDERS 4
#define PJSUA_MAX_CONF_PORTS (PJSUA_MAX_CALLS+2*PJSUA_MAX
_PLAYERS)
#define PJSUA_MAX_BUDDIES 32
#endif
/*
* BB10
*/
#if defined(PJ_CONFIG_BB10) && PJ_CONFIG_BB10
/* Quality 3 - 4 to use resampling small filter */
#define PJSUA_DEFAULT_CODEC_QUALITY 4
#define PJMEDIA_HAS_LEGACY_SOUND_API 0
#undef PJMEDIA_HAS_SPEEX_AEC
#define PJMEDIA_HAS_SPEEX_AEC 0
#undef PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO
#define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0
#endif
/*
* Minimum size * Minimum size
*/ */
#ifdef PJ_CONFIG_MINIMAL_SIZE #ifdef PJ_CONFIG_MINIMAL_SIZE
# undef PJ_OS_HAS_CHECK_STACK # undef PJ_OS_HAS_CHECK_STACK
# define PJ_OS_HAS_CHECK_STACK 0 # define PJ_OS_HAS_CHECK_STACK 0
# define PJ_LOG_MAX_LEVEL 0 # define PJ_LOG_MAX_LEVEL 0
# define PJ_ENABLE_EXTRA_CHECK 0 # define PJ_ENABLE_EXTRA_CHECK 0
# define PJ_HAS_ERROR_STRING 0 # define PJ_HAS_ERROR_STRING 0
# undef PJ_IOQUEUE_MAX_HANDLES # undef PJ_IOQUEUE_MAX_HANDLES
skipping to change at line 396 skipping to change at line 470
# define PJSIP_MAX_TSX_COUNT ((640*1024)-1) # define PJSIP_MAX_TSX_COUNT ((640*1024)-1)
# define PJSIP_MAX_DIALOG_COUNT ((640*1024)-1) # define PJSIP_MAX_DIALOG_COUNT ((640*1024)-1)
# define PJSIP_UDP_SO_SNDBUF_SIZE (24*1024*1024) # define PJSIP_UDP_SO_SNDBUF_SIZE (24*1024*1024)
# define PJSIP_UDP_SO_RCVBUF_SIZE (24*1024*1024) # define PJSIP_UDP_SO_RCVBUF_SIZE (24*1024*1024)
# define PJ_DEBUG 0 # define PJ_DEBUG 0
# define PJSIP_SAFE_MODULE 0 # define PJSIP_SAFE_MODULE 0
# define PJ_HAS_STRICMP_ALNUM 0 # define PJ_HAS_STRICMP_ALNUM 0
# define PJ_HASH_USE_OWN_TOLOWER 1 # define PJ_HASH_USE_OWN_TOLOWER 1
# define PJSIP_UNESCAPE_IN_PLACE 1 # define PJSIP_UNESCAPE_IN_PLACE 1
# ifdef PJ_WIN32 # if defined(PJ_WIN32) || defined(PJ_WIN64)
# define PJSIP_MAX_NET_EVENTS 10 # define PJSIP_MAX_NET_EVENTS 10
# endif # endif
# define PJSUA_MAX_CALLS 512 # define PJSUA_MAX_CALLS 512
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 77 lines changed or added


 endpoint.h   endpoint.h 
/* $Id: endpoint.h 3999 2012-03-30 07:10:13Z bennylp $ */ /* $Id: endpoint.h 4474 2013-04-16 09:12:59Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 149 skipping to change at line 149
* *
* @param endpt The media endpoint instance. * @param endpt The media endpoint instance.
* @param index The index of the thread: 0<= index < thread_ cnt * @param index The index of the thread: 0<= index < thread_ cnt
* *
* @return pj_thread_t or NULL * @return pj_thread_t or NULL
*/ */
PJ_DECL(pj_thread_t*) pjmedia_endpt_get_thread(pjmedia_endpt *endpt, PJ_DECL(pj_thread_t*) pjmedia_endpt_get_thread(pjmedia_endpt *endpt,
unsigned index); unsigned index);
/** /**
* Stop and destroy the worker threads of the media endpoint
*
* @param endpt The media endpoint instance.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_endpt_stop_threads(pjmedia_endpt *endpt);
/**
* Request the media endpoint to create pool. * Request the media endpoint to create pool.
* *
* @param endpt The media endpoint instance. * @param endpt The media endpoint instance.
* @param name Name to be assigned to the pool. * @param name Name to be assigned to the pool.
* @param initial Initial pool size, in bytes. * @param initial Initial pool size, in bytes.
* @param increment Increment size, in bytes. * @param increment Increment size, in bytes.
* *
* @return Memory pool. * @return Memory pool.
*/ */
PJ_DECL(pj_pool_t*) pjmedia_endpt_create_pool( pjmedia_endpt *endpt, PJ_DECL(pj_pool_t*) pjmedia_endpt_create_pool( pjmedia_endpt *endpt,
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added


 errno.h   errno.h 
/* $Id: errno.h 4359 2013-02-21 11:18:36Z bennylp $ */ /* $Id: errno.h 4461 2013-04-05 03:02:19Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 423 skipping to change at line 423
/** /**
* @hideinitializer * @hideinitializer
* Unsupported address family * Unsupported address family
*/ */
#define PJ_EAFNOTSUP (PJ_ERRNO_START_STATUS + 22)/* 70022 */ #define PJ_EAFNOTSUP (PJ_ERRNO_START_STATUS + 22)/* 70022 */
/** /**
* @hideinitializer * @hideinitializer
* Object no longer exists * Object no longer exists
*/ */
#define PJ_EGONE (PJ_ERRNO_START_STATUS + 23)/* 70023 */ #define PJ_EGONE (PJ_ERRNO_START_STATUS + 23)/* 70023 */
/**
* @hideinitializer
* Socket is stopped
*/
#define PJ_ESOCKETSTOP (PJ_ERRNO_START_STATUS + 24)/* 70024 */
/** @} */ /* pj_errnum */ /** @} */ /* pj_errnum */
/** @} */ /* pj_errno */ /** @} */ /* pj_errno */
/** /**
* PJ_ERRNO_START is where PJLIB specific error values start. * PJ_ERRNO_START is where PJLIB specific error values start.
*/ */
#define PJ_ERRNO_START 20000 #define PJ_ERRNO_START 20000
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 evsub.h   evsub.h 
/* $Id: evsub.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: evsub.h 4704 2014-01-16 05:30:46Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 58 skipping to change at line 58
*/ */
typedef struct pjsip_evsub pjsip_evsub; typedef struct pjsip_evsub pjsip_evsub;
/** /**
* This enumeration describes basic subscription state as described in the * This enumeration describes basic subscription state as described in the
* RFC 3265. The standard specifies that extensions may define additional * RFC 3265. The standard specifies that extensions may define additional
* states. In the case where the state is not known, the subscription state * states. In the case where the state is not known, the subscription state
* will be set to PJSIP_EVSUB_STATE_UNKNOWN, and the token will be kept * will be set to PJSIP_EVSUB_STATE_UNKNOWN, and the token will be kept
* in state_str member of the susbcription structure. * in state_str member of the susbcription structure.
*/ */
enum pjsip_evsub_state typedef enum pjsip_evsub_state
{ {
PJSIP_EVSUB_STATE_NULL, /**< State is NULL. */ PJSIP_EVSUB_STATE_NULL, /**< State is NULL. */
PJSIP_EVSUB_STATE_SENT, /**< Client has sent SUBSCRIBE request. */ PJSIP_EVSUB_STATE_SENT, /**< Client has sent SUBSCRIBE request. */
PJSIP_EVSUB_STATE_ACCEPTED, /**< 2xx response to SUBSCRIBE has been PJSIP_EVSUB_STATE_ACCEPTED, /**< 2xx response to SUBSCRIBE has been
sent/received. */ sent/received. */
PJSIP_EVSUB_STATE_PENDING, /**< Subscription is pending. */ PJSIP_EVSUB_STATE_PENDING, /**< Subscription is pending. */
PJSIP_EVSUB_STATE_ACTIVE, /**< Subscription is active. */ PJSIP_EVSUB_STATE_ACTIVE, /**< Subscription is active. */
PJSIP_EVSUB_STATE_TERMINATED,/**< Subscription is terminated. */ PJSIP_EVSUB_STATE_TERMINATED,/**< Subscription is terminated. */
PJSIP_EVSUB_STATE_UNKNOWN, /**< Subscription state can not be determin ed. PJSIP_EVSUB_STATE_UNKNOWN, /**< Subscription state can not be determin ed.
Application can query the state by Application can query the state by
calling #pjsip_evsub_get_state_name(). */ calling #pjsip_evsub_get_state_name(). */
}; } pjsip_evsub_state;
/**
* @see pjsip_evsub_state
*/
typedef enum pjsip_evsub_state pjsip_evsub_state;
/** /**
* Some options for the event subscription. * Some options for the event subscription.
*/ */
enum enum
{ {
/** /**
* If this flag is set, then outgoing request to create subscription * If this flag is set, then outgoing request to create subscription
* will not have id in the Event header (e.g. in REFER request). But if * will not have id in the Event header (e.g. in REFER request). But if
* there is an id in the incoming NOTIFY, that id will be used. * there is an id in the incoming NOTIFY, that id will be used.
 End of changes. 3 change blocks. 
8 lines changed or deleted 3 lines changed or added


 except.h   except.h 
/* $Id: except.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: except.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 339 skipping to change at line 339
** IMPLEMENTATION OF EXCEPTION USING GENERIC SETJMP/LONGJMP ** IMPLEMENTATION OF EXCEPTION USING GENERIC SETJMP/LONGJMP
** **
************************************************************************** **/ ************************************************************************** **/
/** /**
* This structure (which should be invisible to user) manages the TRY handl er * This structure (which should be invisible to user) manages the TRY handl er
* stack. * stack.
*/ */
struct pj_exception_state_t struct pj_exception_state_t
{ {
struct pj_exception_state_t *prev; /**< Previous state in the list. */
pj_jmp_buf state; /**< jmp_buf. */ pj_jmp_buf state; /**< jmp_buf. */
struct pj_exception_state_t *prev; /**< Previous state in the list. */
}; };
/** /**
* Throw exception. * Throw exception.
* @param id Exception Id. * @param id Exception Id.
*/ */
PJ_DECL_NO_RETURN(void) PJ_DECL_NO_RETURN(void)
pj_throw_exception_(pj_exception_id_t id) PJ_ATTR_NORETURN; pj_throw_exception_(pj_exception_id_t id) PJ_ATTR_NORETURN;
/** /**
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added


 format.h   format.h 
/* $Id: format.h 4158 2012-06-06 09:56:14Z nanang $ */ /* $Id: format.h 4470 2013-04-15 10:40:26Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 521 skipping to change at line 521
* @param frame_rate Frame rate * @param frame_rate Frame rate
* *
* @return The ptime value (in usec). * @return The ptime value (in usec).
*/ */
PJ_INLINE(unsigned) PJMEDIA_PTIME(const pjmedia_ratio *frame_rate) PJ_INLINE(unsigned) PJMEDIA_PTIME(const pjmedia_ratio *frame_rate)
{ {
#if PJ_HAS_INT64 #if PJ_HAS_INT64
return ((unsigned)((pj_uint64_t)1000000 * \ return ((unsigned)((pj_uint64_t)1000000 * \
frame_rate->denum / frame_rate->num)); frame_rate->denum / frame_rate->num));
#elif PJ_HAS_FLOATING_POINT #elif PJ_HAS_FLOATING_POINT
return ((unsigned)(1000000.0 * frame_rate->denum / \ return ((unsigned)(1000000.0 * frame_rate->denum /
frame_rate->num)); frame_rate->num));
#else #else
return ((unsigned)((1000L * frame_rate->denum / \ return ((unsigned)((1000L * frame_rate->denum /
frame_rate->num) * 1000); frame_rate->num) * 1000));
#endif #endif
} }
/** /**
* Utility to retrieve samples_per_frame value from * Utility to retrieve samples_per_frame value from
* pjmedia_audio_format_detail. * pjmedia_audio_format_detail.
* *
* @param pafd Pointer to pjmedia_audio_format_detail * @param pafd Pointer to pjmedia_audio_format_detail
* @return Samples per frame * @return Samples per frame
*/ */
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added


 frame.h   frame.h 
/* $Id: frame.h 3715 2011-08-19 09:35:25Z nanang $ */ /* $Id: frame.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 230 skipping to change at line 230
* @param frm The #pjmedia_frame_ext. * @param frm The #pjmedia_frame_ext.
* @param n Number of first subframes to be popped out. * @param n Number of first subframes to be popped out.
* *
* @return PJ_SUCCESS when successful. * @return PJ_SUCCESS when successful.
*/ */
PJ_INLINE(pj_status_t) PJ_INLINE(pj_status_t)
pjmedia_frame_ext_pop_subframes(pjmedia_frame_ext *frm, unsigned n) pjmedia_frame_ext_pop_subframes(pjmedia_frame_ext *frm, unsigned n)
{ {
pjmedia_frame_ext_subframe *sf; pjmedia_frame_ext_subframe *sf;
pj_uint8_t *move_src; pj_uint8_t *move_src;
unsigned move_len; pj_size_t move_len;
if (frm->subframe_cnt <= n) { if (frm->subframe_cnt <= n) {
frm->subframe_cnt = 0; frm->subframe_cnt = 0;
frm->samples_cnt = 0; frm->samples_cnt = 0;
return PJ_SUCCESS; return PJ_SUCCESS;
} }
move_src = (pj_uint8_t*)pjmedia_frame_ext_get_subframe(frm, n); move_src = (pj_uint8_t*)pjmedia_frame_ext_get_subframe(frm, n);
sf = pjmedia_frame_ext_get_subframe(frm, frm->subframe_cnt-1); sf = pjmedia_frame_ext_get_subframe(frm, frm->subframe_cnt-1);
move_len = (pj_uint8_t*)sf - move_src + sizeof(sf->bitlen) + move_len = ((pj_uint8_t*)sf - move_src + sizeof(sf->bitlen) +
((sf->bitlen+7) >> 3); ((sf->bitlen+7) >> 3));
pj_memmove((pj_uint8_t*)frm+sizeof(pjmedia_frame_ext), pj_memmove((pj_uint8_t*)frm+sizeof(pjmedia_frame_ext),
move_src, move_len); move_src, move_len);
frm->samples_cnt = (pj_uint16_t) frm->samples_cnt = (pj_uint16_t)
(frm->samples_cnt - n*frm->samples_cnt/frm->subframe_cnt) ; (frm->samples_cnt - n*frm->samples_cnt/frm->subframe_cnt) ;
frm->subframe_cnt = (pj_uint16_t) (frm->subframe_cnt - n); frm->subframe_cnt = (pj_uint16_t) (frm->subframe_cnt - n);
return PJ_SUCCESS; return PJ_SUCCESS;
} }
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added


 getopt.h   getopt.h 
/* $Id: getopt.h 2037 2008-06-20 21:39:02Z bennylp $ */ /* $Id: getopt.h 4578 2013-08-02 02:31:44Z ming $ */
/* This file has now become GPL. */
/* Declarations for pj_getopt. /* Declarations for pj_getopt.
Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc . Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc .
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful, The GNU C Library is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
2 lines changed or deleted 1 lines changed or added


 ice_session.h   ice_session.h 
/* $Id: ice_session.h 4360 2013-02-21 11:26:35Z bennylp $ */ /* $Id: ice_session.h 4602 2013-09-25 04:57:26Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 156 skipping to change at line 156
/** /**
* ICE peer reflexive candidate, which is the address as seen by peer * ICE peer reflexive candidate, which is the address as seen by peer
* agent during connectivity check. * agent during connectivity check.
*/ */
PJ_ICE_CAND_TYPE_PRFLX, PJ_ICE_CAND_TYPE_PRFLX,
/** /**
* ICE relayed candidate, which represents the address allocated in * ICE relayed candidate, which represents the address allocated in
* TURN server. * TURN server.
*/ */
PJ_ICE_CAND_TYPE_RELAYED PJ_ICE_CAND_TYPE_RELAYED,
/**
* Number of defined ICE candidate types.
*/
PJ_ICE_CAND_TYPE_MAX
} pj_ice_cand_type; } pj_ice_cand_type;
/** Forward declaration for pj_ice_sess */ /** Forward declaration for pj_ice_sess */
typedef struct pj_ice_sess pj_ice_sess; typedef struct pj_ice_sess pj_ice_sess;
/** Forward declaration for pj_ice_sess_check */ /** Forward declaration for pj_ice_sess_check */
typedef struct pj_ice_sess_check pj_ice_sess_check; typedef struct pj_ice_sess_check pj_ice_sess_check;
/** /**
 End of changes. 2 change blocks. 
2 lines changed or deleted 7 lines changed or added


 ice_strans.h   ice_strans.h 
/* $Id: ice_strans.h 4133 2012-05-21 14:00:17Z bennylp $ */ /* $Id: ice_strans.h 4606 2013-10-01 05:00:57Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 369 skipping to change at line 369
/** /**
* Set the low level QoS parameters to the transport. This is a * Set the low level QoS parameters to the transport. This is a
* lower level operation than setting the \a qos_type field and * lower level operation than setting the \a qos_type field and
* may not be supported on all platforms. * may not be supported on all platforms.
* *
* By default all settings in this structure are disabled. * By default all settings in this structure are disabled.
*/ */
pj_qos_params qos_params; pj_qos_params qos_params;
/**
* Specify target value for socket receive buffer size. It will be
* applied using setsockopt(). When it fails to set the specified
* size, it will try with lower value until the highest possible is
* successfully set.
*
* When this is set to zero, this component will apply socket receiv
e
* buffer size settings specified in STUN and TURN socket config
* above, i.e: \a stun::cfg::so_rcvbuf_size and
* \a turn::cfg::so_rcvbuf_size. Otherwise, this setting will be
* applied to STUN and TURN sockets for this component, overriding
* the setting specified in STUN/TURN socket config.
*
* Default: 0
*/
unsigned so_rcvbuf_size;
/**
* Specify target value for socket send buffer size. It will be
* applied using setsockopt(). When it fails to set the specified
* size, it will try with lower value until the highest possible is
* successfully set.
*
* When this is set to zero, this component will apply socket send
* buffer size settings specified in STUN and TURN socket config
* above, i.e: \a stun::cfg::so_sndbuf_size and
* \a turn::cfg::so_sndbuf_size. Otherwise, this setting will be
* applied to STUN and TURN sockets for this component, overriding
* the setting specified in STUN/TURN socket config.
*
* Default: 0
*/
unsigned so_sndbuf_size;
} comp[PJ_ICE_MAX_COMP]; } comp[PJ_ICE_MAX_COMP];
} pj_ice_strans_cfg; } pj_ice_strans_cfg;
/** /**
* ICE stream transport's state. * ICE stream transport's state.
*/ */
typedef enum pj_ice_strans_state typedef enum pj_ice_strans_state
{ {
/** /**
skipping to change at line 522 skipping to change at line 556
* *
* @param ice_st The ICE stream transport. * @param ice_st The ICE stream transport.
* @param opt Options to be applied to this ICE stream transport. * @param opt Options to be applied to this ICE stream transport.
* *
* @return PJ_SUCCESS on success, or the appropriate error. * @return PJ_SUCCESS on success, or the appropriate error.
*/ */
PJ_DECL(pj_status_t) pj_ice_strans_set_options(pj_ice_strans *ice_st, PJ_DECL(pj_status_t) pj_ice_strans_set_options(pj_ice_strans *ice_st,
const pj_ice_sess_options *op t); const pj_ice_sess_options *op t);
/** /**
* Get the group lock for this ICE stream transport.
*
* @param ice_st The ICE stream transport.
*
* @return The group lock.
*/
PJ_DECL(pj_grp_lock_t *) pj_ice_strans_get_grp_lock(pj_ice_strans *ice_st);
/**
* Initialize the ICE session in the ICE stream transport. * Initialize the ICE session in the ICE stream transport.
* When application is about to send an offer containing ICE capability, * When application is about to send an offer containing ICE capability,
* or when it receives an offer containing ICE capability, it must * or when it receives an offer containing ICE capability, it must
* call this function to initialize the internal ICE session. This would * call this function to initialize the internal ICE session. This would
* register all transport address aliases for each component to the ICE * register all transport address aliases for each component to the ICE
* session as candidates. Then application can enumerate all local * session as candidates. Then application can enumerate all local
* candidates by calling #pj_ice_strans_enum_cands(), and encode these * candidates by calling #pj_ice_strans_enum_cands(), and encode these
* candidates in the SDP to be sent to remote agent. * candidates in the SDP to be sent to remote agent.
* *
* @param ice_st The ICE stream transport. * @param ice_st The ICE stream transport.
 End of changes. 3 change blocks. 
1 lines changed or deleted 45 lines changed or added


 ioqueue.h   ioqueue.h 
/* $Id: ioqueue.h 4359 2013-02-21 11:18:36Z bennylp $ /* $Id: ioqueue.h 4724 2014-01-31 08:52:09Z nanang $
*/ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
skipping to change at line 636 skipping to change at line 636
* - zero if timed out (no event). * - zero if timed out (no event).
* - (<0) if error occured during polling. Callback will NOT be called. * - (<0) if error occured during polling. Callback will NOT be called.
* - (>1) to indicate numbers of events. Callbacks have been called. * - (>1) to indicate numbers of events. Callbacks have been called.
*/ */
PJ_DECL(int) pj_ioqueue_poll( pj_ioqueue_t *ioque, PJ_DECL(int) pj_ioqueue_poll( pj_ioqueue_t *ioque,
const pj_time_val *timeout); const pj_time_val *timeout);
/** /**
* Instruct the I/O Queue to read from the specified handle. This function * Instruct the I/O Queue to read from the specified handle. This function
* returns immediately (i.e. non-blocking) regardless whether some data has * returns immediately (i.e. non-blocking) regardless whether some data has
* been transfered. If the operation can't complete immediately, caller wil l * been transferred. If the operation can't complete immediately, caller wi ll
* be notified about the completion when it calls pj_ioqueue_poll(). If dat a * be notified about the completion when it calls pj_ioqueue_poll(). If dat a
* is immediately available, the function will return PJ_SUCCESS and the * is immediately available, the function will return PJ_SUCCESS and the
* callback WILL NOT be called. * callback WILL NOT be called.
* *
* @param key The key that uniquely identifies the handle. * @param key The key that uniquely identifies the handle.
* @param op_key An operation specific key to be associated with the * @param op_key An operation specific key to be associated with the
* pending operation, so that application can keep track o f * pending operation, so that application can keep track o f
* which operation has been completed when the callback is * which operation has been completed when the callback is
* called. Caller must make sure that this key remains * called. Caller must make sure that this key remains
* valid until the function completes. * valid until the function completes.
skipping to change at line 722 skipping to change at line 722
pj_ioqueue_op_key_t *op_key, pj_ioqueue_op_key_t *op_key,
void *buffer, void *buffer,
pj_ssize_t *length, pj_ssize_t *length,
pj_uint32_t flags, pj_uint32_t flags,
pj_sockaddr_t *addr, pj_sockaddr_t *addr,
int *addrlen); int *addrlen);
/** /**
* Instruct the I/O Queue to write to the handle. This function will return * Instruct the I/O Queue to write to the handle. This function will return
* immediately (i.e. non-blocking) regardless whether some data has been * immediately (i.e. non-blocking) regardless whether some data has been
* transfered. If the function can't complete immediately, the caller will * transferred. If the function can't complete immediately, the caller will
* be notified about the completion when it calls pj_ioqueue_poll(). If * be notified about the completion when it calls pj_ioqueue_poll(). If
* operation completes immediately and data has been transfered, the functi on * operation completes immediately and data has been transferred, the funct ion
* returns PJ_SUCCESS and the callback will NOT be called. * returns PJ_SUCCESS and the callback will NOT be called.
* *
* @param key The key that identifies the handle. * @param key The key that identifies the handle.
* @param op_key An operation specific key to be associated with the * @param op_key An operation specific key to be associated with the
* pending operation, so that application can keep track o f * pending operation, so that application can keep track o f
* which operation has been completed when the callback is * which operation has been completed when the callback is
* called. * called.
* @param data The data to send. Caller MUST make sure that this buffer * @param data The data to send. Caller MUST make sure that this buffer
* remains valid until the write operation completes. * remains valid until the write operation completes.
* @param length On input, it specifies the length of data to send. When * @param length On input, it specifies the length of data to send. When
skipping to change at line 746 skipping to change at line 746
* and this parameter contains the length of data sent. If * and this parameter contains the length of data sent. If
* data can not be sent immediately, an asynchronous opera tion * data can not be sent immediately, an asynchronous opera tion
* is scheduled and caller will be notified via callback t he * is scheduled and caller will be notified via callback t he
* number of bytes sent. This parameter can point to local * number of bytes sent. This parameter can point to local
* variable on caller's stack and doesn't have to remain * variable on caller's stack and doesn't have to remain
* valid until the operation has completed. * valid until the operation has completed.
* @param flags Send flags. If flags has PJ_IOQUEUE_ALWAYS_ASYNC then * @param flags Send flags. If flags has PJ_IOQUEUE_ALWAYS_ASYNC then
* the function will never return PJ_SUCCESS. * the function will never return PJ_SUCCESS.
* *
* @return * @return
* - PJ_SUCCESS If data was immediately transfered. In this case, no * - PJ_SUCCESS If data was immediately transferred. In this case, no
* pending operation has been scheduled and the callback * pending operation has been scheduled and the callback
* WILL NOT be called. * WILL NOT be called.
* - PJ_EPENDING If the operation has been queued. Once data base been * - PJ_EPENDING If the operation has been queued. Once data base been
* transfered, the callback will be called. * transferred, the callback will be called.
* - non-zero The return value indicates the error code. * - non-zero The return value indicates the error code.
*/ */
PJ_DECL(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key, PJ_DECL(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key,
pj_ioqueue_op_key_t *op_key, pj_ioqueue_op_key_t *op_key,
const void *data, const void *data,
pj_ssize_t *length, pj_ssize_t *length,
pj_uint32_t flags ); pj_uint32_t flags );
/** /**
* Instruct the I/O Queue to write to the handle. This function will return * Instruct the I/O Queue to write to the handle. This function will return
* immediately (i.e. non-blocking) regardless whether some data has been * immediately (i.e. non-blocking) regardless whether some data has been
* transfered. If the function can't complete immediately, the caller will * transferred. If the function can't complete immediately, the caller will
* be notified about the completion when it calls pj_ioqueue_poll(). If * be notified about the completion when it calls pj_ioqueue_poll(). If
* operation completes immediately and data has been transfered, the functi on * operation completes immediately and data has been transferred, the funct ion
* returns PJ_SUCCESS and the callback will NOT be called. * returns PJ_SUCCESS and the callback will NOT be called.
* *
* @param key the key that identifies the handle. * @param key the key that identifies the handle.
* @param op_key An operation specific key to be associated with the * @param op_key An operation specific key to be associated with the
* pending operation, so that application can keep track o f * pending operation, so that application can keep track o f
* which operation has been completed when the callback is * which operation has been completed when the callback is
* called. * called.
* @param data the data to send. Caller MUST make sure that this buffer * @param data the data to send. Caller MUST make sure that this buffer
* remains valid until the write operation completes. * remains valid until the write operation completes.
* @param length On input, it specifies the length of data to send. When * @param length On input, it specifies the length of data to send. When
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added


 list.h   list.h 
/* $Id: list.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: list.h 4624 2013-10-21 06:37:30Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 75 skipping to change at line 75
type *next type *next
/** /**
* This structure describes generic list node and list. The owner of this l ist * This structure describes generic list node and list. The owner of this l ist
* must initialize the 'value' member to an appropriate value (typically th e * must initialize the 'value' member to an appropriate value (typically th e
* owner itself). * owner itself).
*/ */
struct pj_list struct pj_list
{ {
PJ_DECL_LIST_MEMBER(void); PJ_DECL_LIST_MEMBER(void);
}; } PJ_ATTR_MAY_ALIAS; /* may_alias avoids warning with gcc-4.4 -Wall -O2 */
/** /**
* Initialize the list. * Initialize the list.
* Initially, the list will have no member, and function pj_list_empty() wi ll * Initially, the list will have no member, and function pj_list_empty() wi ll
* always return nonzero (which indicates TRUE) for the newly initialized * always return nonzero (which indicates TRUE) for the newly initialized
* list. * list.
* *
* @param node The list head. * @param node The list head.
*/ */
PJ_INLINE(void) pj_list_init(pj_list_type * node) PJ_INLINE(void) pj_list_init(pj_list_type * node)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 log.h   log.h 
/* $Id: log.h 3752 2011-09-18 14:38:46Z bennylp $ */ /* $Id: log.h 4584 2013-08-30 04:03:22Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 262 skipping to change at line 262
* this function to write the actual message to the desired device. * this function to write the actual message to the desired device.
* By default, the front-end functions use pj_log_write() to write * By default, the front-end functions use pj_log_write() to write
* the messages, unless it's changed by calling this function. * the messages, unless it's changed by calling this function.
* *
* @param func The function that will be called to write the log * @param func The function that will be called to write the log
* messages to the desired device. * messages to the desired device.
*/ */
# define pj_log_set_log_func(func) # define pj_log_set_log_func(func)
/** /**
* Write to log.
*
* @param sender Source of the message.
* @param level Verbosity level.
* @param format Format.
* @param marker Marker.
*/
# define pj_log(sender, level, format, marker)
/**
* Set maximum log level. Application can call this function to set * Set maximum log level. Application can call this function to set
* the desired level of verbosity of the logging messages. The bigger the * the desired level of verbosity of the logging messages. The bigger the
* value, the more verbose the logging messages will be printed. However, * value, the more verbose the logging messages will be printed. However,
* the maximum level of verbosity can not exceed compile time value of * the maximum level of verbosity can not exceed compile time value of
* PJ_LOG_MAX_LEVEL. * PJ_LOG_MAX_LEVEL.
* *
* @param level The maximum level of verbosity of the logging * @param level The maximum level of verbosity of the logging
* messages (6=very detailed..1=error only, 0=disabled) * messages (6=very detailed..1=error only, 0=disabled)
*/ */
# define pj_log_set_level(level) # define pj_log_set_level(level)
skipping to change at line 285 skipping to change at line 295
* to output device alongside the actual message. For example, application * to output device alongside the actual message. For example, application
* can specify that date/time information should be displayed with each * can specify that date/time information should be displayed with each
* log message. * log message.
* *
* @param decor Bitmask combination of #pj_log_decoration to con trol * @param decor Bitmask combination of #pj_log_decoration to con trol
* the layout of the log message. * the layout of the log message.
*/ */
# define pj_log_set_decor(decor) # define pj_log_set_decor(decor)
/** /**
* Add indentation to log message. Indentation will add PJ_LOG_INDENT_CHAR
* before the message, and is useful to show the depth of function calls.
*
* @param indent The indentation to add or substract. Positive value
* adds current indent, negative value subtracts current
* indent.
*/
# define pj_log_add_indent(indent)
/**
* Push indentation to the right by default value (PJ_LOG_INDENT).
*/
# define pj_log_push_indent()
/**
* Pop indentation (to the left) by default value (PJ_LOG_INDENT).
*/
# define pj_log_pop_indent()
/**
* Set color of log messages. * Set color of log messages.
* *
* @param level Log level which color will be changed. * @param level Log level which color will be changed.
* @param color Desired color. * @param color Desired color.
*/ */
# define pj_log_set_color(level, color) # define pj_log_set_color(level, color)
/** /**
* Get current maximum log verbositylevel. * Get current maximum log verbositylevel.
* *
 End of changes. 3 change blocks. 
1 lines changed or deleted 31 lines changed or added


 os.h   os.h 
/* $Id: os.h 3664 2011-07-19 03:42:28Z nanang $ */ /* $Id: os.h 4760 2014-02-24 08:49:40Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 1418 skipping to change at line 1418
/** @} */ /** @} */
/* ************************************************************************ **/ /* ************************************************************************ **/
/** /**
* @defgroup PJ_APP_OS Application execution * @defgroup PJ_APP_OS Application execution
* @ingroup PJ_OS * @ingroup PJ_OS
* @{ * @{
*/ */
/* Type for main function. */ /**
* Type for application main function.
*/
typedef int (*pj_main_func_ptr)(int argc, char *argv[]); typedef int (*pj_main_func_ptr)(int argc, char *argv[]);
/** /**
* Run the application. This function has to be called in the main thread * Run the application. This function has to be called in the main thread
* and after doing the necessary initialization according to the flags * and after doing the necessary initialization according to the flags
* provided, it will call main_func() function. * provided, it will call main_func() function.
* *
* @param main_func Application's main function. * @param main_func Application's main function.
* @param argc Number of arguments from the main() function, which * @param argc Number of arguments from the main() function, which
* will be passed to main_func() function. * will be passed to main_func() function.
* @param argv The arguments from the main() function, which will * @param argv The arguments from the main() function, which will
* be passed to main_func() function. * be passed to main_func() function.
* @param flags Flags for application execution, currently must be 0. * @param flags Flags for application execution, currently must be 0.
* *
* @return main_func()'s return value. * @return main_func()'s return value.
*/ */
int pj_run_app(pj_main_func_ptr main_func, int argc, char *argv[], PJ_DECL(int) pj_run_app(pj_main_func_ptr main_func, int argc, char *argv[],
unsigned flags); unsigned flags);
/** @} */ /** @} */
/* ************************************************************************ **/ /* ************************************************************************ **/
/** /**
* Internal PJLIB function to initialize the threading subsystem. * Internal PJLIB function to initialize the threading subsystem.
* @return PJ_SUCCESS or the appropriate error code. * @return PJ_SUCCESS or the appropriate error code.
*/ */
pj_status_t pj_thread_init(void); pj_status_t pj_thread_init(void);
 End of changes. 3 change blocks. 
4 lines changed or deleted 6 lines changed or added


 os_darwinos.h   os_darwinos.h 
/* $Id: os_darwinos.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: os_darwinos.h 4626 2013-10-21 07:04:38Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 95 skipping to change at line 95
#define PJ_HAS_HIGH_RES_TIMER 1 #define PJ_HAS_HIGH_RES_TIMER 1
#define PJ_HAS_MALLOC 1 #define PJ_HAS_MALLOC 1
#ifndef PJ_OS_HAS_CHECK_STACK #ifndef PJ_OS_HAS_CHECK_STACK
# define PJ_OS_HAS_CHECK_STACK 0 # define PJ_OS_HAS_CHECK_STACK 0
#endif #endif
#define PJ_NATIVE_STRING_IS_UNICODE 0 #define PJ_NATIVE_STRING_IS_UNICODE 0
#define PJ_ATOMIC_VALUE_TYPE long #define PJ_ATOMIC_VALUE_TYPE long
/*
* Socket related
*/
typedef int socklen_t;
/* Set 1 if native sockaddr_in has sin_len member. /* Set 1 if native sockaddr_in has sin_len member.
* Default: 0 * Default: 0
*/ */
#define PJ_SOCKADDR_HAS_LEN 1 #define PJ_SOCKADDR_HAS_LEN 1
/* /*
* gcc complains that it can not use precompiled header because * gcc complains that it can not use precompiled header because
* the value of FD_SETSIZE that we declare in pj/config.h is * the value of FD_SETSIZE that we declare in pj/config.h is
* different than the value in /usr/include/sys/types.h. * different than the value in /usr/include/sys/types.h.
* *
skipping to change at line 140 skipping to change at line 135
* threads. * threads.
* Default: 0 (let OS decide the thread's stack size). * Default: 0 (let OS decide the thread's stack size).
*/ */
#define PJ_THREAD_SET_STACK_SIZE 0 #define PJ_THREAD_SET_STACK_SIZE 0
/* If 1, pj_thread_create() should allocate stack from the pool supplied. /* If 1, pj_thread_create() should allocate stack from the pool supplied.
* Default: 0 (let OS allocate memory for thread's stack). * Default: 0 (let OS allocate memory for thread's stack).
*/ */
#define PJ_THREAD_ALLOCATE_STACK 0 #define PJ_THREAD_ALLOCATE_STACK 0
/* Oh well.. MacOS 10.2 doesn't have socklen_t, but 10.4 has! */ /* MacOS has had socklen since 10.4 */
#define PJ_HAS_SOCKLEN_T 0 #define PJ_HAS_SOCKLEN_T 1
#endif /* __PJ_COMPAT_OS_DARWINOS_H__ */ #endif /* __PJ_COMPAT_OS_DARWINOS_H__ */
 End of changes. 3 change blocks. 
8 lines changed or deleted 3 lines changed or added


 pjlib-util.h   pjlib-util.h 
/* $Id: pjlib-util.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: pjlib-util.h 4704 2014-01-16 05:30:46Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 51 skipping to change at line 51
#include <pjlib-util/sha1.h> #include <pjlib-util/sha1.h>
/* DNS and resolver */ /* DNS and resolver */
#include <pjlib-util/dns.h> #include <pjlib-util/dns.h>
#include <pjlib-util/resolver.h> #include <pjlib-util/resolver.h>
#include <pjlib-util/srv_resolver.h> #include <pjlib-util/srv_resolver.h>
/* Simple DNS server */ /* Simple DNS server */
#include <pjlib-util/dns_server.h> #include <pjlib-util/dns_server.h>
/* Text scanner */ /* Text scanner and utilities */
#include <pjlib-util/scanner.h> #include <pjlib-util/scanner.h>
#include <pjlib-util/string.h>
/* XML */ /* XML */
#include <pjlib-util/xml.h> #include <pjlib-util/xml.h>
/* JSON */
#include <pjlib-util/json.h>
/* Old STUN */ /* Old STUN */
#include <pjlib-util/stun_simple.h> #include <pjlib-util/stun_simple.h>
/* PCAP */ /* PCAP */
#include <pjlib-util/pcap.h> #include <pjlib-util/pcap.h>
/* HTTP */ /* HTTP */
#include <pjlib-util/http_client.h> #include <pjlib-util/http_client.h>
/** CLI **/
#include <pjlib-util/cli.h>
#include <pjlib-util/cli_console.h>
#include <pjlib-util/cli_telnet.h>
#endif /* __PJLIB_UTIL_H__ */ #endif /* __PJLIB_UTIL_H__ */
 End of changes. 5 change blocks. 
2 lines changed or deleted 11 lines changed or added


 pjsua_internal.h   pjsua_internal.h 
/* $Id: pjsua_internal.h 4342 2013-02-06 13:48:45Z nanang $ */ /* $Id: pjsua_internal.h 4750 2014-02-19 04:11:43Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 214 skipping to change at line 214
*/ */
typedef struct pjsua_acc typedef struct pjsua_acc
{ {
pj_pool_t *pool; /**< Pool for this account. */ pj_pool_t *pool; /**< Pool for this account. */
pjsua_acc_config cfg; /**< Account configuration. */ pjsua_acc_config cfg; /**< Account configuration. */
pj_bool_t valid; /**< Is this account valid? */ pj_bool_t valid; /**< Is this account valid? */
int index; /**< Index in accounts array. */ int index; /**< Index in accounts array. */
pj_str_t display; /**< Display name, if any. */ pj_str_t display; /**< Display name, if any. */
pj_str_t user_part; /**< User part of local URI. */ pj_str_t user_part; /**< User part of local URI. */
pj_bool_t is_sips; /**< Local URI uses "sips"? */
pj_str_t contact; /**< Our Contact header. */ pj_str_t contact; /**< Our Contact header. */
pj_str_t reg_contact; /**< Contact header for REGISTER. pj_str_t reg_contact; /**< Contact header for REGISTER.
It may be different than acc It may be different than acc
contact if outbound is used */ contact if outbound is used */
pjsip_host_port via_addr; /**< Address for Via header */ pjsip_host_port via_addr; /**< Address for Via header */
pjsip_transport *via_tp; /**< Transport associated with pjsip_transport *via_tp; /**< Transport associated with
the Via address */ the Via address */
pj_str_t srv_domain; /**< Host part of reg server. */ pj_str_t srv_domain; /**< Host part of reg server. */
int srv_port; /**< Port number of reg server. */ int srv_port; /**< Port number of reg server. */
pjsip_regc *regc; /**< Client registration session. */ pjsip_regc *regc; /**< Client registration session. */
pj_status_t reg_last_err; /**< Last registration error. */ pj_status_t reg_last_err; /**< Last registration error. */
int reg_last_code; /**< Last status last register. */ int reg_last_code; /**< Last status last register. */
pj_str_t reg_mapped_addr;/**< Our addr as seen by reg srv.
Only if allow_sdp_nat_rewrite
is set */
struct { struct {
pj_bool_t active; /**< Flag of reregister status. */ pj_bool_t active; /**< Flag of reregister status. */
pj_timer_entry timer; /**< Timer for reregistration. */ pj_timer_entry timer; /**< Timer for reregistration. */
void *reg_tp; /**< Transport for registration. */ void *reg_tp; /**< Transport for registration. */
unsigned attempt_cnt; /**< Attempt counter. */ unsigned attempt_cnt; /**< Attempt counter. */
} auto_rereg; /**< Reregister/reconnect data. */ } auto_rereg; /**< Reregister/reconnect data. */
pj_timer_entry ka_timer; /**< Keep-alive timer for UDP. */ pj_timer_entry ka_timer; /**< Keep-alive timer for UDP. */
pjsip_transport *ka_transport; /**< Transport for keep-alive. */ pjsip_transport *ka_transport; /**< Transport for keep-alive. */
pj_sockaddr ka_target; /**< Destination address for K-A */ pj_sockaddr ka_target; /**< Destination address for K-A */
skipping to change at line 263 skipping to change at line 268
pjsip_cred_info cred[PJSUA_ACC_MAX_PROXIES]; /**< Complete creds. */ pjsip_cred_info cred[PJSUA_ACC_MAX_PROXIES]; /**< Complete creds. */
pj_bool_t online_status; /**< Our online status. */ pj_bool_t online_status; /**< Our online status. */
pjrpid_element rpid; /**< RPID element information. */ pjrpid_element rpid; /**< RPID element information. */
pjsua_srv_pres pres_srv_list; /**< Server subscription list. */ pjsua_srv_pres pres_srv_list; /**< Server subscription list. */
pjsip_publishc *publish_sess; /**< Client publication session. */ pjsip_publishc *publish_sess; /**< Client publication session. */
pj_bool_t publish_state; /**< Last published online status */ pj_bool_t publish_state; /**< Last published online status */
pjsip_evsub *mwi_sub; /**< MWI client subscription */ pjsip_evsub *mwi_sub; /**< MWI client subscription */
pjsip_dialog *mwi_dlg; /**< Dialog for MWI sub. */ pjsip_dialog *mwi_dlg; /**< Dialog for MWI sub. */
pj_uint16_t next_rtp_port; /**< Next RTP port to be used. */
} pjsua_acc; } pjsua_acc;
/** /**
*Transport. *Transport.
*/ */
typedef struct pjsua_transport_data typedef struct pjsua_transport_data
{ {
int index; int index;
pjsip_transport_type_e type; pjsip_transport_type_e type;
pjsip_host_port local_name; pjsip_host_port local_name;
skipping to change at line 617 skipping to change at line 624
pj_status_t pjsua_media_channel_create_sdp(pjsua_call_id call_id, pj_status_t pjsua_media_channel_create_sdp(pjsua_call_id call_id,
pj_pool_t *pool, pj_pool_t *pool,
const pjmedia_sdp_session *rem_sd p, const pjmedia_sdp_session *rem_sd p,
pjmedia_sdp_session **p_sdp, pjmedia_sdp_session **p_sdp,
int *sip_err_code); int *sip_err_code);
pj_status_t pjsua_media_channel_update(pjsua_call_id call_id, pj_status_t pjsua_media_channel_update(pjsua_call_id call_id,
const pjmedia_sdp_session *local_sdp, const pjmedia_sdp_session *local_sdp,
const pjmedia_sdp_session *remote_sdp ); const pjmedia_sdp_session *remote_sdp );
pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id); pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id);
/*
* Error message when media operation is requested while another is in prog
ress
*/
#define ERR_MEDIA_CHANGING " because another media operation is in progres
s"
pj_bool_t pjsua_call_media_is_changing(pjsua_call *call);
pj_status_t pjsua_call_media_init(pjsua_call_media *call_med, pj_status_t pjsua_call_media_init(pjsua_call_media *call_med,
pjmedia_type type, pjmedia_type type,
const pjsua_transport_config *tcfg, const pjsua_transport_config *tcfg,
int security_level, int security_level,
int *sip_err_code, int *sip_err_code,
pj_bool_t async, pj_bool_t async,
pjsua_med_tp_state_cb cb); pjsua_med_tp_state_cb cb);
void pjsua_set_media_tp_state(pjsua_call_media *call_med, pjsua_med_tp_st t p_st); void pjsua_set_media_tp_state(pjsua_call_media *call_med, pjsua_med_tp_st t p_st);
void pjsua_media_prov_clean_up(pjsua_call_id call_id); void pjsua_media_prov_clean_up(pjsua_call_id call_id);
 End of changes. 5 change blocks. 
1 lines changed or deleted 16 lines changed or added


 pool.h   pool.h 
/* $Id: pool.h 4298 2012-11-22 05:00:01Z nanang $ */ /* $Id: pool.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 847 skipping to change at line 847
pj_list free_list[PJ_CACHING_POOL_ARRAY_SIZE]; pj_list free_list[PJ_CACHING_POOL_ARRAY_SIZE];
/** /**
* List of pools currently allocated by applications. * List of pools currently allocated by applications.
*/ */
pj_list used_list; pj_list used_list;
/** /**
* Internal pool. * Internal pool.
*/ */
char pool_buf[256 * (sizeof(long) / 4)]; char pool_buf[256 * (sizeof(size_t) / 4)];
/** /**
* Mutex. * Mutex.
*/ */
pj_lock_t *lock; pj_lock_t *lock;
}; };
/** /**
* Initialize caching pool. * Initialize caching pool.
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 print_util.h   print_util.h 
/* $Id: print_util.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: print_util.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 33 skipping to change at line 33
#define copy_advance_check(buf,str) \ #define copy_advance_check(buf,str) \
do { \ do { \
if ((str).slen >= (endbuf-buf)) return -1; \ if ((str).slen >= (endbuf-buf)) return -1; \
pj_memcpy(buf, (str).ptr, (str).slen); \ pj_memcpy(buf, (str).ptr, (str).slen); \
buf += (str).slen; \ buf += (str).slen; \
} while (0) } while (0)
#define copy_advance_pair_check(buf,str1,len1,str2) \ #define copy_advance_pair_check(buf,str1,len1,str2) \
do { \ do { \
if (str2.slen) { \ if (str2.slen) { \
printed = len1+str2.slen; \ printed = len1+(int)str2.slen; \
if (printed >= (endbuf-buf)) return -1; \ if (printed >= (endbuf-buf)) return -1; \
pj_memcpy(buf,str1,len1); \ pj_memcpy(buf,str1,len1); \
pj_memcpy(buf+len1, str2.ptr, str2.slen); \ pj_memcpy(buf+len1, str2.ptr, str2.slen); \
buf += printed; \ buf += printed; \
} \ } \
} while (0) } while (0)
#define copy_advance_pair_quote_check(buf,str1,len1,str2,quotebegin,quoteen d) \ #define copy_advance_pair_quote_check(buf,str1,len1,str2,quotebegin,quoteen d) \
do { \ do { \
if (str2.slen) { \ if (str2.slen) { \
skipping to change at line 56 skipping to change at line 56
pj_memcpy(buf,str1,len1); \ pj_memcpy(buf,str1,len1); \
*(buf+len1)=quotebegin; \ *(buf+len1)=quotebegin; \
pj_memcpy(buf+len1+1, str2.ptr, str2.slen); \ pj_memcpy(buf+len1+1, str2.ptr, str2.slen); \
*(buf+printed-1) = quoteend; \ *(buf+printed-1) = quoteend; \
buf += printed; \ buf += printed; \
} \ } \
} while (0) } while (0)
#define copy_advance_pair_quote(buf,str1,len1,str2,quotebegin,quoteend) \ #define copy_advance_pair_quote(buf,str1,len1,str2,quotebegin,quoteend) \
do { \ do { \
printed = len1+str2.slen+2; \ printed = len1+(int)str2.slen+2; \
if (printed >= (endbuf-buf)) return -1; \ if (printed >= (endbuf-buf)) return -1; \
pj_memcpy(buf,str1,len1); \ pj_memcpy(buf,str1,len1); \
*(buf+len1)=quotebegin; \ *(buf+len1)=quotebegin; \
pj_memcpy(buf+len1+1, str2.ptr, str2.slen); \ pj_memcpy(buf+len1+1, str2.ptr, str2.slen); \
*(buf+printed-1) = quoteend; \ *(buf+printed-1) = quoteend; \
buf += printed; \ buf += printed; \
} while (0) } while (0)
#define copy_advance_pair_escape(buf,str1,len1,str2,unres) \ #define copy_advance_pair_escape(buf,str1,len1,str2,unres) \
do { \ do { \
if (str2.slen) { \ if (str2.slen) { \
if (len1+str2.slen >= (endbuf-buf)) return -1; \ if (len1+str2.slen >= (endbuf-buf)) return -1; \
pj_memcpy(buf,str1,len1); \ pj_memcpy(buf,str1,len1); \
printed=pj_strncpy2_escape(buf+len1,&str2,(endbuf-buf-len1),&unr printed=(int)pj_strncpy2_escape(buf+len1,&str2,(endbuf-buf-len1)
es);\ , \
&unres);\
if (printed < 0) return -1; \ if (printed < 0) return -1; \
buf += (printed+len1); \ buf += (printed+len1); \
} \ } \
} while (0) } while (0)
#define copy_advance_no_check(buf,str) \ #define copy_advance_no_check(buf,str) \
do { \ do { \
pj_memcpy(buf, (str).ptr, (str).slen); \ pj_memcpy(buf, (str).ptr, (str).slen); \
buf += (str).slen; \ buf += (str).slen; \
} while (0) } while (0)
#define copy_advance_escape(buf,str,unres) \ #define copy_advance_escape(buf,str,unres) \
do { \ do { \
printed = \ printed = \
pj_strncpy2_escape(buf, &(str), (endbuf-buf), &(unres)); \ (int)pj_strncpy2_escape(buf, &(str), (endbuf-buf), &(unres)) ; \
if (printed < 0) return -1; \ if (printed < 0) return -1; \
buf += printed; \ buf += printed; \
} while (0) } while (0)
#define copy_advance_pair_no_check(buf,str1,len1,str2) \ #define copy_advance_pair_no_check(buf,str1,len1,str2) \
if (str2.slen) { \ if (str2.slen) { \
pj_memcpy(buf,str1,len1); \ pj_memcpy(buf,str1,len1); \
pj_memcpy(buf+len1, str2.ptr, str2.slen); \ pj_memcpy(buf+len1, str2.ptr, str2.slen); \
buf += len1+str2.slen; \ buf += len1+str2.slen; \
} }
 End of changes. 5 change blocks. 
6 lines changed or deleted 7 lines changed or added


 scanner.h   scanner.h 
/* $Id: scanner.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: scanner.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 228 skipping to change at line 228
* @param bufstart The input buffer to scan. Note that buffer[buflen] will be * @param bufstart The input buffer to scan. Note that buffer[buflen] will be
* filled with NULL char until scanner is destroyed, so * filled with NULL char until scanner is destroyed, so
* the actual buffer length must be at least buflen+1. * the actual buffer length must be at least buflen+1.
* @param buflen The length of the input buffer, which normally is * @param buflen The length of the input buffer, which normally is
* strlen(bufstart). * strlen(bufstart).
* @param options Zero, or combination of PJ_SCAN_AUTOSKIP_WS or * @param options Zero, or combination of PJ_SCAN_AUTOSKIP_WS or
* PJ_SCAN_AUTOSKIP_WS_HEADER * PJ_SCAN_AUTOSKIP_WS_HEADER
* @param callback Callback to be called when the scanner encounters synta x * @param callback Callback to be called when the scanner encounters synta x
* error condition. * error condition.
*/ */
PJ_DECL(void) pj_scan_init( pj_scanner *scanner, char *bufstart, int buflen PJ_DECL(void) pj_scan_init( pj_scanner *scanner, char *bufstart,
, pj_size_t buflen,
unsigned options, unsigned options,
pj_syn_err_func_ptr callback ); pj_syn_err_func_ptr callback );
/** /**
* Call this function when application has finished using the scanner. * Call this function when application has finished using the scanner.
* *
* @param scanner The scanner. * @param scanner The scanner.
*/ */
PJ_DECL(void) pj_scan_fini( pj_scanner *scanner ); PJ_DECL(void) pj_scan_fini( pj_scanner *scanner );
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 sdp_neg.h   sdp_neg.h 
/* $Id: sdp_neg.h 3664 2011-07-19 03:42:28Z nanang $ */ /* $Id: sdp_neg.h 4577 2013-08-01 04:18:15Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 54 skipping to change at line 54
* *
* The following diagram describes the state transition diagram of the * The following diagram describes the state transition diagram of the
* SDP negotiator. * SDP negotiator.
* *
* <pre> * <pre>
* *
* modify_local_offer() * modify_local_offer()
* create_w_local_offer() +-------------+ send_local_offer() * create_w_local_offer() +-------------+ send_local_offer()
* ----------------------->| LOCAL_OFFER |<----------------------- * ----------------------->| LOCAL_OFFER |<-----------------------
* | +-------------+______ | * | +-------------+______ |
* | | \______ cancel() | * | | \_____________ |
* | set_remote_answer() | \______ | * | set_remote_answer() | cancel_offer() \ |
* | V \ | * | V v |
* +--+---+ +-----------+ negotiate() +-~----+ * +--+---+ +-----------+ negotiate() +-~----+
* | NULL | | WAIT_NEGO |-------------------->| DONE | * | NULL | | WAIT_NEGO |-------------------->| DONE |
* +------+ +-----------+ +------+ * +------+ +-----------+ +------+
* | A | * | A ______________________^ |
* | set_local_answer() | | * | set_local_answer() | / cancel_offer() |
* | | | * | | / |
* | +--------------+ set_remote_offer() | * | +--------------+ set_remote_offer() |
* ----------------------->| REMOTE_OFFER |<---------------------- * ----------------------->| REMOTE_OFFER |<----------------------
* create_w_remote_offer() +--------------+ * create_w_remote_offer() +--------------+
* *
* </pre> * </pre>
* *
* *
* *
* \section sdpneg_offer_answer SDP Offer/Answer Model with Negotiator * \section sdpneg_offer_answer SDP Offer/Answer Model with Negotiator
* *
skipping to change at line 312 skipping to change at line 312
* @see pjmedia_sdp_neg_state * @see pjmedia_sdp_neg_state
*/ */
typedef enum pjmedia_sdp_neg_state pjmedia_sdp_neg_state; typedef enum pjmedia_sdp_neg_state pjmedia_sdp_neg_state;
/** /**
* Opaque declaration of SDP negotiator. * Opaque declaration of SDP negotiator.
*/ */
typedef struct pjmedia_sdp_neg pjmedia_sdp_neg; typedef struct pjmedia_sdp_neg pjmedia_sdp_neg;
/** /**
* Flags to be given to pjmedia_sdp_neg_modify_local_offer2().
*/
typedef enum pjmedia_mod_offer_flag
{
/**
* Allow media type in the SDP to be changed.
* When generating a new offer, in the case that a media line doesn't ma
tch
* the active SDP, the new media line will be considered to replace the
* existing media at the same position.
*/
PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE = 1
} pjmedia_mod_offer_flag;
/**
* Get the state string description of the specified state. * Get the state string description of the specified state.
* *
* @param state Negotiator state. * @param state Negotiator state.
* *
* @return String description of the state. * @return String description of the state.
*/ */
PJ_DECL(const char*) pjmedia_sdp_neg_state_str(pjmedia_sdp_neg_state state) ; PJ_DECL(const char*) pjmedia_sdp_neg_state_str(pjmedia_sdp_neg_state state) ;
/** /**
* Create the SDP negotiator with local offer. The SDP negotiator then * Create the SDP negotiator with local offer. The SDP negotiator then
skipping to change at line 399 skipping to change at line 414
* @param neg The SDP negotiator instance. * @param neg The SDP negotiator instance.
* @param prefer_remote If non-zero, the negotiator will use the cod ec * @param prefer_remote If non-zero, the negotiator will use the cod ec
* order as specified in remote offer. If zero, it * order as specified in remote offer. If zero, it
* will prefer to use the local codec order. * will prefer to use the local codec order.
*/ */
PJ_DECL(pj_status_t) PJ_DECL(pj_status_t)
pjmedia_sdp_neg_set_prefer_remote_codec_order(pjmedia_sdp_neg *neg, pjmedia_sdp_neg_set_prefer_remote_codec_order(pjmedia_sdp_neg *neg,
pj_bool_t prefer_remote); pj_bool_t prefer_remote);
/** /**
* This specifies the behavior of the SDP negotiator when responding to an
* offer, whether it should answer with multiple formats or not.
*
* By default, the value in PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS will
* be used.
*
* @param neg The SDP negotiator instance.
* @param answer_multiple
* If non-zero, the negotiator will respond with
* multiple formats. If zero only a single format
* will be returned.
*/
PJ_DECL(pj_status_t)
pjmedia_sdp_neg_set_answer_multiple_codecs(pjmedia_sdp_neg *neg,
pj_bool_t answer_multiple);
/**
* Get SDP negotiator state. * Get SDP negotiator state.
* *
* @param neg The SDP negotiator instance. * @param neg The SDP negotiator instance.
* *
* @return The negotiator state. * @return The negotiator state.
*/ */
PJ_DECL(pjmedia_sdp_neg_state) PJ_DECL(pjmedia_sdp_neg_state)
pjmedia_sdp_neg_get_state( pjmedia_sdp_neg *neg ); pjmedia_sdp_neg_get_state( pjmedia_sdp_neg *neg );
/** /**
skipping to change at line 494 skipping to change at line 526
PJ_DECL(pj_status_t) PJ_DECL(pj_status_t)
pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg, pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg,
const pjmedia_sdp_session **local); const pjmedia_sdp_session **local);
/** /**
* Modify local session with a new SDP and treat this as a new offer. * Modify local session with a new SDP and treat this as a new offer.
* This function can only be called in state PJMEDIA_SDP_NEG_STATE_DONE. * This function can only be called in state PJMEDIA_SDP_NEG_STATE_DONE.
* After calling this function, application can send the SDP as offer * After calling this function, application can send the SDP as offer
* to remote party, using signaling protocol such as SIP. * to remote party, using signaling protocol such as SIP.
* The negotiator state will move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, * The negotiator state will move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER,
* where it waits for SDP answer from remote. * where it waits for SDP answer from remote. See also
* #pjmedia_sdp_neg_modify_local_offer2()
* *
* @param pool Pool to allocate memory. The pool's lifetime needs * @param pool Pool to allocate memory. The pool's lifetime needs
* to be valid for the duration of the negotiator. * to be valid for the duration of the negotiator.
* @param neg The SDP negotiator instance. * @param neg The SDP negotiator instance.
* @param local The new local SDP. * @param local The new local SDP.
* *
* @return PJ_SUCCESS on success, or the appropriate * @return PJ_SUCCESS on success, or the appropriate
* error code. * error code.
*/ */
PJ_DECL(pj_status_t) PJ_DECL(pj_status_t)
pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool, pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool,
pjmedia_sdp_neg *neg, pjmedia_sdp_neg *neg,
const pjmedia_sdp_session *local); const pjmedia_sdp_session *local);
/** /**
* Modify local session with a new SDP and treat this as a new offer.
* This function can only be called in state PJMEDIA_SDP_NEG_STATE_DONE.
* After calling this function, application can send the SDP as offer
* to remote party, using signaling protocol such as SIP.
* The negotiator state will move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER,
* where it waits for SDP answer from remote.
*
* @param pool Pool to allocate memory. The pool's lifetime needs
* to be valid for the duration of the negotiator.
* @param neg The SDP negotiator instance.
* @param flags Bitmask from pjmedia_mod_offer_flag.
* @param local The new local SDP.
*
* @return PJ_SUCCESS on success, or the appropriate
* error code.
*/
PJ_DECL(pj_status_t)
pjmedia_sdp_neg_modify_local_offer2( pj_pool_t *pool,
pjmedia_sdp_neg *neg,
unsigned flags,
const pjmedia_sdp_session *local);
/**
* This function can only be called in PJMEDIA_SDP_NEG_STATE_DONE state. * This function can only be called in PJMEDIA_SDP_NEG_STATE_DONE state.
* Application calls this function to retrieve currently active * Application calls this function to retrieve currently active
* local SDP, and then send the SDP to remote as an offer. The negotiator * local SDP, and then send the SDP to remote as an offer. The negotiator
* state will then move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, where it wait s * state will then move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, where it wait s
* for SDP answer from remote. * for SDP answer from remote.
* *
* When SDP answer has been received from remote, application must call * When SDP answer has been received from remote, application must call
* #pjmedia_sdp_neg_set_remote_answer(). * #pjmedia_sdp_neg_set_remote_answer().
* *
* @param pool Pool to allocate memory. The pool's lifetime needs * @param pool Pool to allocate memory. The pool's lifetime needs
 End of changes. 7 change blocks. 
8 lines changed or deleted 65 lines changed or added


 sip_config.h   sip_config.h 
/* $Id: sip_config.h 4285 2012-10-19 04:23:57Z nanang $ */ /* $Id: sip_config.h 4720 2014-01-29 09:53:06Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 114 skipping to change at line 114
pj_bool_t disable_rport; pj_bool_t disable_rport;
/** /**
* Disable automatic switching from UDP to TCP if outgoing request * Disable automatic switching from UDP to TCP if outgoing request
* is greater than 1300 bytes. * is greater than 1300 bytes.
* *
* Default is PJSIP_DONT_SWITCH_TO_TCP. * Default is PJSIP_DONT_SWITCH_TO_TCP.
*/ */
pj_bool_t disable_tcp_switch; pj_bool_t disable_tcp_switch;
/**
* Enable call media session to always be updated to the latest
* received early media SDP when receiving forked early media
* (multiple 183 responses with different To tag).
*
* Default is PJSIP_FOLLOW_EARLY_MEDIA_FORK.
*/
pj_bool_t follow_early_media_fork;
/**
* Specify whether "alias" param should be added to the Via header
* in any outgoing request with connection oriented transport.
*
* Default is PJSIP_REQ_HAS_VIA_ALIAS.
*/
pj_bool_t req_has_via_alias;
} endpt; } endpt;
/** Transaction layer settings. */ /** Transaction layer settings. */
struct { struct {
/** Maximum number of transactions. The value is initialized with /** Maximum number of transactions. The value is initialized with
* PJSIP_MAX_TSX_COUNT * PJSIP_MAX_TSX_COUNT
*/ */
unsigned max_count; unsigned max_count;
skipping to change at line 286 skipping to change at line 303
* This option can also be controlled at run-time by the \a disable_tcp_swi tch * This option can also be controlled at run-time by the \a disable_tcp_swi tch
* setting in pjsip_cfg_t. * setting in pjsip_cfg_t.
* *
* Default is 0 (no). * Default is 0 (no).
*/ */
#ifndef PJSIP_DONT_SWITCH_TO_TCP #ifndef PJSIP_DONT_SWITCH_TO_TCP
# define PJSIP_DONT_SWITCH_TO_TCP 0 # define PJSIP_DONT_SWITCH_TO_TCP 0
#endif #endif
/** /**
* Specify whether the call media session should be updated to the latest
* received early media SDP when receiving forked early media (multiple 183
* responses with different To tag).
*
* This option can also be controlled at run-time by the
* \a follow_early_media_fork setting in pjsip_cfg_t.
*
* Default is PJ_TRUE.
*/
#ifndef PJSIP_FOLLOW_EARLY_MEDIA_FORK
# define PJSIP_FOLLOW_EARLY_MEDIA_FORK PJ_TRUE
#endif
/**
* Specify whether "alias" param should be added to the Via header
* in any outgoing request with connection oriented transport.
*
* This option can also be controlled at run-time by the
* \a req_has_via_alias setting in pjsip_cfg_t.
*
* Default is PJ_TRUE.
*/
#ifndef PJSIP_REQ_HAS_VIA_ALIAS
# define PJSIP_REQ_HAS_VIA_ALIAS PJ_TRUE
#endif
/**
* Accept call replace in early state when invite is not initiated * Accept call replace in early state when invite is not initiated
* by the user agent. RFC 3891 Section 3 disallows this, however, * by the user agent. RFC 3891 Section 3 disallows this, however,
* for better interoperability reason, this might be ignored. * for better interoperability reason, this might be ignored.
* *
* This option can also be controlled at run-time by the * This option can also be controlled at run-time by the
* \a accept_replace_in_early_state setting in pjsip_cfg_t. * \a accept_replace_in_early_state setting in pjsip_cfg_t.
* *
* Default is 0 (no). * Default is 0 (no).
*/ */
#ifndef PJSIP_ACCEPT_REPLACE_IN_EARLY_STATE #ifndef PJSIP_ACCEPT_REPLACE_IN_EARLY_STATE
skipping to change at line 504 skipping to change at line 548
* *
* Default: 5 * Default: 5
* *
* @see PJSIP_TLS_TRANSPORT_BACKLOG * @see PJSIP_TLS_TRANSPORT_BACKLOG
*/ */
#ifndef PJSIP_TCP_TRANSPORT_BACKLOG #ifndef PJSIP_TCP_TRANSPORT_BACKLOG
# define PJSIP_TCP_TRANSPORT_BACKLOG 5 # define PJSIP_TCP_TRANSPORT_BACKLOG 5
#endif #endif
/** /**
* Specify whether TCP listener should use SO_REUSEADDR option. This consta
nt
* will be used as the default value for the "reuse_addr" field in the
* pjsip_tcp_transport_cfg structure.
*
* Default is FALSE on Windows and TRUE on non-Windows.
*
* @see PJSIP_TLS_TRANSPORT_REUSEADDR
*/
#ifndef PJSIP_TCP_TRANSPORT_REUSEADDR
# if (defined(PJ_WIN32) && PJ_WIN32) || (defined(PJ_WIN64) && PJ_WIN64)
# define PJSIP_TCP_TRANSPORT_REUSEADDR 0
# else
# define PJSIP_TCP_TRANSPORT_REUSEADDR 1
# endif
#endif
/**
* Set the interval to send keep-alive packet for TCP transports. * Set the interval to send keep-alive packet for TCP transports.
* If the value is zero, keep-alive will be disabled for TCP. * If the value is zero, keep-alive will be disabled for TCP.
* *
* Default: 90 (seconds) * Default: 90 (seconds)
* *
* @see PJSIP_TCP_KEEP_ALIVE_DATA * @see PJSIP_TCP_KEEP_ALIVE_DATA
*/ */
#ifndef PJSIP_TCP_KEEP_ALIVE_INTERVAL #ifndef PJSIP_TCP_KEEP_ALIVE_INTERVAL
# define PJSIP_TCP_KEEP_ALIVE_INTERVAL 90 # define PJSIP_TCP_KEEP_ALIVE_INTERVAL 90
#endif #endif
skipping to change at line 603 skipping to change at line 664
* The TLS pending incoming connection backlog number to be set in accept() . * The TLS pending incoming connection backlog number to be set in accept() .
* *
* Default: 5 * Default: 5
* *
* @see PJSIP_TCP_TRANSPORT_BACKLOG * @see PJSIP_TCP_TRANSPORT_BACKLOG
*/ */
#ifndef PJSIP_TLS_TRANSPORT_BACKLOG #ifndef PJSIP_TLS_TRANSPORT_BACKLOG
# define PJSIP_TLS_TRANSPORT_BACKLOG 5 # define PJSIP_TLS_TRANSPORT_BACKLOG 5
#endif #endif
/**
* Specify whether TLS listener should use SO_REUSEADDR option.
*
* Default is FALSE on Windows and TRUE on non-Windows.
*
* @see PJSIP_TCP_TRANSPORT_REUSEADDR
*/
#ifndef PJSIP_TLS_TRANSPORT_REUSEADDR
# if (defined(PJ_WIN32) && PJ_WIN32) || (defined(PJ_WIN64) && PJ_WIN64)
# define PJSIP_TLS_TRANSPORT_REUSEADDR 0
# else
# define PJSIP_TLS_TRANSPORT_REUSEADDR 1
# endif
#endif
/* Endpoint. */ /* Endpoint. */
#define PJSIP_MAX_TIMER_COUNT (2*pjsip_cfg()->tsx.max_count + \ #define PJSIP_MAX_TIMER_COUNT (2*pjsip_cfg()->tsx.max_count + \
2*PJSIP_MAX_DIALOG_COUNT) 2*PJSIP_MAX_DIALOG_COUNT)
/** /**
* Initial memory block for the endpoint. * Initial memory block for the endpoint.
*/ */
#ifndef PJSIP_POOL_LEN_ENDPT #ifndef PJSIP_POOL_LEN_ENDPT
# define PJSIP_POOL_LEN_ENDPT (4000) # define PJSIP_POOL_LEN_ENDPT (4000)
#endif #endif
skipping to change at line 831 skipping to change at line 907
* Default: 3 * Default: 3
*/ */
#ifndef PJSIP_MAX_STALE_COUNT #ifndef PJSIP_MAX_STALE_COUNT
# define PJSIP_MAX_STALE_COUNT 3 # define PJSIP_MAX_STALE_COUNT 3
#endif #endif
/** /**
* Specify support for IMS/3GPP digest AKA authentication version 1 and 2 * Specify support for IMS/3GPP digest AKA authentication version 1 and 2
* (AKAv1-MD5 and AKAv2-MD5 respectively). * (AKAv1-MD5 and AKAv2-MD5 respectively).
* *
* Note that if this is enabled, application would need to link with
* <b>libmilenage</b> library from \a third_party directory.
*
* Default: 0 (for now) * Default: 0 (for now)
*/ */
#ifndef PJSIP_HAS_DIGEST_AKA_AUTH #ifndef PJSIP_HAS_DIGEST_AKA_AUTH
# define PJSIP_HAS_DIGEST_AKA_AUTH 0 # define PJSIP_HAS_DIGEST_AKA_AUTH 0
#endif #endif
/** /**
* Specify the number of seconds to refresh the client registration * Specify the number of seconds to refresh the client registration
* before the registration expires. * before the registration expires.
* *
skipping to change at line 1007 skipping to change at line 1086
* expiration value from the Expires header sent by client in the SUBSCRIBE * expiration value from the Expires header sent by client in the SUBSCRIBE
* request if the header exists and its value is less than this setting, * request if the header exists and its value is less than this setting,
* otherwise this setting will be used. * otherwise this setting will be used.
* *
* Default: 3600 seconds * Default: 3600 seconds
*/ */
#ifndef PJSIP_MWI_DEFAULT_EXPIRES #ifndef PJSIP_MWI_DEFAULT_EXPIRES
# define PJSIP_MWI_DEFAULT_EXPIRES 3600 # define PJSIP_MWI_DEFAULT_EXPIRES 3600
#endif #endif
/**
* Specify whether transport manager should maintain a list of transmit
* buffer instances, so any possible dangling instance can be cleaned up
* when the transport manager is shutdown (see also ticket #1671).
* Note that this feature will have slight impact on the performance as
* mutex is employed in updating the list, i.e: on creation and destruction
* of transmit data.
*
* Default: 0 (no)
*/
#ifndef PJSIP_HAS_TX_DATA_LIST
# define PJSIP_HAS_TX_DATA_LIST 0
#endif
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#include <pj/config.h> #include <pj/config.h>
#endif /* __PJSIP_SIP_CONFIG_H__ */ #endif /* __PJSIP_SIP_CONFIG_H__ */
 End of changes. 7 change blocks. 
1 lines changed or deleted 95 lines changed or added


 sip_inv.h   sip_inv.h 
/* $Id: sip_inv.h 3841 2011-10-24 09:28:13Z ming $ */ /* $Id: sip_inv.h 4653 2013-11-19 10:18:17Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 160 skipping to change at line 160
* this SDP answer will be negotiated with the offer, and the result * this SDP answer will be negotiated with the offer, and the result
* will be sent with the SIP message. * will be sent with the SIP message.
* *
* @param inv The invite session. * @param inv The invite session.
* @param offer Remote offer. * @param offer Remote offer.
*/ */
void (*on_rx_offer)(pjsip_inv_session *inv, void (*on_rx_offer)(pjsip_inv_session *inv,
const pjmedia_sdp_session *offer); const pjmedia_sdp_session *offer);
/** /**
* This callback is optional, and is called when the invite session has
* received a re-INVITE from the peer. It will be called after
* on_rx_offer() callback and works only for re-INVITEs. It allows more
* fine-grained control over the response to a re-INVITE, e.g. sending
* a provisional response first. Application can return PJ_SUCCESS and
* send a reply using the function #pjsip_inv_initial_answer() or
* #pjsip_inv_answer(), as with the initial INVITE. If application
* returns non-PJ_SUCCESS, it needs to set the SDP answer with
* #pjsip_inv_set_sdp_answer() and the re-INVITE will be answered
* automatically.
*
* Remarks: Application may need to monitor on_tsx_state_changed()
* callback to check whether the re-INVITE is already answered
* automatically with 487 due to being cancelled.
*
* @param inv The invite session.
* @param offer Remote offer.
* @param rdata The received re-INVITE request.
*
* @return - PJ_SUCCESS: application will answer the re-INVITE
* manually
* - non-PJ_SUCCESS: answer the re-INVITE automaticall
y
* using the SDP set via #pjsip_inv_set_sdp_answer()
*/
pj_status_t (*on_rx_reinvite)(pjsip_inv_session *inv,
const pjmedia_sdp_session *offer,
pjsip_rx_data *rdata);
/**
* This callback is optional, and it is used to ask the application * This callback is optional, and it is used to ask the application
* to create a fresh offer, when the invite session has received * to create a fresh offer, when the invite session has received
* re-INVITE without offer. This offer then will be sent in the * re-INVITE without offer. This offer then will be sent in the
* 200/OK response to the re-INVITE request. * 200/OK response to the re-INVITE request.
* *
* If application doesn't implement this callback, the invite session * If application doesn't implement this callback, the invite session
* will send the currently active SDP as the offer. * will send the currently active SDP as the offer.
* *
* @param inv The invite session. * @param inv The invite session.
* @param p_offer Pointer to receive the SDP offer created by * @param p_offer Pointer to receive the SDP offer created by
skipping to change at line 361 skipping to change at line 390
*/ */
struct pjsip_inv_session struct pjsip_inv_session
{ {
char obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification */ char obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification */
pj_pool_t *pool; /**< Long term pool. */ pj_pool_t *pool; /**< Long term pool. */
pj_pool_t *pool_prov; /**< Provisional pool */ pj_pool_t *pool_prov; /**< Provisional pool */
pj_pool_t *pool_active; /**< Active/current pool */ pj_pool_t *pool_active; /**< Active/current pool */
pjsip_inv_state state; /**< Invite sess state. */ pjsip_inv_state state; /**< Invite sess state. */
pj_bool_t cancelling; /**< CANCEL requested */ pj_bool_t cancelling; /**< CANCEL requested */
pj_bool_t pending_cancel; /**< Wait to send CANCEL */ pj_bool_t pending_cancel; /**< Wait to send CANCEL */
pjsip_tx_data *pending_bye; /**< BYE to send later */
pjsip_status_code cause; /**< Disconnect cause. */ pjsip_status_code cause; /**< Disconnect cause. */
pj_str_t cause_text; /**< Cause text. */ pj_str_t cause_text; /**< Cause text. */
pj_bool_t notify; /**< Internal. */ pj_bool_t notify; /**< Internal. */
unsigned cb_called; /**< Cb has been called */ unsigned cb_called; /**< Cb has been called */
pjsip_dialog *dlg; /**< Underlying dialog. */ pjsip_dialog *dlg; /**< Underlying dialog. */
pjsip_role_e role; /**< Invite role. */ pjsip_role_e role; /**< Invite role. */
unsigned options; /**< Options in use. */ unsigned options; /**< Options in use. */
pjmedia_sdp_neg *neg; /**< Negotiator. */ pjmedia_sdp_neg *neg; /**< Negotiator. */
unsigned sdp_neg_flags; /**< SDP neg flags. */
pjsip_transaction *invite_tsx; /**< 1st invite tsx. */ pjsip_transaction *invite_tsx; /**< 1st invite tsx. */
pjsip_tx_data *invite_req; /**< Saved invite req */ pjsip_tx_data *invite_req; /**< Saved invite req */
pjsip_tx_data *last_answer; /**< Last INVITE resp. */ pjsip_tx_data *last_answer; /**< Last INVITE resp. */
pjsip_tx_data *last_ack; /**< Last ACK request */ pjsip_tx_data *last_ack; /**< Last ACK request */
pj_int32_t last_ack_cseq; /**< CSeq of last ACK */ pj_int32_t last_ack_cseq; /**< CSeq of last ACK */
void *mod_data[PJSIP_MAX_MODULE];/**< Modules data. */ void *mod_data[PJSIP_MAX_MODULE];/**< Modules data. */
struct pjsip_timer *timer; /**< Session Timers. */ struct pjsip_timer *timer; /**< Session Timers. */
}; };
/** /**
skipping to change at line 683 skipping to change at line 714
* #pjsip_inv_answer() to create subsequent response message. * #pjsip_inv_answer() to create subsequent response message.
*/ */
PJ_DECL(pj_status_t) pjsip_inv_initial_answer( pjsip_inv_session *inv, PJ_DECL(pj_status_t) pjsip_inv_initial_answer( pjsip_inv_session *inv,
pjsip_rx_data *rdata, pjsip_rx_data *rdata,
int st_code, int st_code,
const pj_str_t *st_text, const pj_str_t *st_text,
const pjmedia_sdp_session *s dp, const pjmedia_sdp_session *s dp,
pjsip_tx_data **p_tdata); pjsip_tx_data **p_tdata);
/** /**
* Create a response message to the initial INVITE request. This function * Create a response message to an INVITE request.
* can only be called for the initial INVITE request, as subsequent
* re-INVITE request will be answered automatically.
* *
* @param inv The UAS invite session. * @param inv The UAS invite session.
* @param st_code The st_code contains the status code to be sent, * @param st_code The st_code contains the status code to be sent,
* which may be a provisional or final response. * which may be a provisional or final response.
* @param st_text If custom status text is desired, application can * @param st_text If custom status text is desired, application can
* specify the text in st_text; otherwise if this * specify the text in st_text; otherwise if this
* argument is NULL, default status text will be used. * argument is NULL, default status text will be used.
* @param local_sdp If application has specified its media capability * @param local_sdp If application has specified its media capability
* during creation of UAS invite session, the local_sdp * during creation of UAS invite session, the local_sdp
* argument MUST be NULL. This is because application * argument MUST be NULL. This is because application
skipping to change at line 779 skipping to change at line 808
* function returns PJ_SUCCESS, see the description. * function returns PJ_SUCCESS, see the description.
* *
* @return PJ_SUCCESS if termination is initiated. * @return PJ_SUCCESS if termination is initiated.
*/ */
PJ_DECL(pj_status_t) pjsip_inv_end_session( pjsip_inv_session *inv, PJ_DECL(pj_status_t) pjsip_inv_end_session( pjsip_inv_session *inv,
int st_code, int st_code,
const pj_str_t *st_text, const pj_str_t *st_text,
pjsip_tx_data **p_tdata ); pjsip_tx_data **p_tdata );
/** /**
* Create a CANCEL request for an ongoing re-INVITE transaction. If no
* provisional response has been received, the function will not create
* CANCEL request (the function will return PJ_SUCCESS but the \a p_tdata
* will contain NULL) because we cannot send CANCEL before receiving
* provisional response. If then a provisional response is received,
* the invite session will send CANCEL automatically.
*
* @param inv The invite session.
* @param p_tdata Pointer to receive the message to be created. Note
* that it's possible to receive NULL here while the
* function returns PJ_SUCCESS, see the description.
*
* @return PJ_SUCCESS if termination is initiated.
*/
PJ_DECL(pj_status_t) pjsip_inv_cancel_reinvite( pjsip_inv_session *inv,
pjsip_tx_data **p_tdata );
/**
* Create a re-INVITE request. * Create a re-INVITE request.
* *
* @param inv The invite session. * @param inv The invite session.
* @param new_contact If application wants to update its local contact and * @param new_contact If application wants to update its local contact and
* inform peer to perform target refresh with a new * inform peer to perform target refresh with a new
* contact, it can specify the new contact in this * contact, it can specify the new contact in this
* argument; otherwise this argument must be NULL. * argument; otherwise this argument must be NULL.
* @param new_offer Application MAY initiate a new SDP offer/answer * @param new_offer Application MAY initiate a new SDP offer/answer
* session in the request when there is no pending * session in the request when there is no pending
* answer to be sent or received. It can detect this * answer to be sent or received. It can detect this
 End of changes. 6 change blocks. 
4 lines changed or deleted 52 lines changed or added


 sip_msg.h   sip_msg.h 
/* $Id: sip_msg.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_msg.h 4700 2014-01-02 01:25:22Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 1038 skipping to change at line 1038
* *
* @return The header, or THROW exception. * @return The header, or THROW exception.
*/ */
PJ_DECL(void) pjsip_generic_string_hdr_init2(pjsip_generic_string_hdr *h, PJ_DECL(void) pjsip_generic_string_hdr_init2(pjsip_generic_string_hdr *h,
pj_str_t *hname, pj_str_t *hname,
pj_str_t *hvalue); pj_str_t *hvalue);
/* ************************************************************************ **/ /* ************************************************************************ **/
/** /**
* Generic SIP header, which contains hname and a string hvalue. * Generic SIP header, which contains hname and an integer ivalue.
*/ */
typedef struct pjsip_generic_int_hdr typedef struct pjsip_generic_int_hdr
{ {
PJSIP_DECL_HDR_MEMBER(struct pjsip_generic_int_hdr); /**< Standard head /** Standard header field. */
er field. */ PJSIP_DECL_HDR_MEMBER(struct pjsip_generic_int_hdr);
pj_int32_t ivalue; /**< ivalue */ /** ivalue */
pj_int32_t ivalue;
} pjsip_generic_int_hdr; } pjsip_generic_int_hdr;
/** /**
* Create a new instance of generic header. A generic header can have an * Create a new instance of generic header. A generic header can have an
* arbitrary header name. * arbitrary header name.
* *
* @param pool The pool. * @param pool The pool.
* @param hname The header name to be assigned to the header, or NULL to * @param hname The header name to be assigned to the header, or NULL to
* assign the header name with some string. * assign the header name with some string.
* @param hvalue The value to be assigned to the header. * @param hvalue The value to be assigned to the header.
 End of changes. 3 change blocks. 
5 lines changed or deleted 6 lines changed or added


 sip_parser.h   sip_parser.h 
/* $Id: sip_parser.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_parser.h 4445 2013-03-20 11:29:08Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 405 skipping to change at line 405
/* Parse parameter in URL (matching the character as paramchar) */ /* Parse parameter in URL (matching the character as paramchar) */
PJ_DECL(void) pjsip_parse_uri_param_imp(pj_scanner *scanner, pj_pool_t *poo l, PJ_DECL(void) pjsip_parse_uri_param_imp(pj_scanner *scanner, pj_pool_t *poo l,
pj_str_t *pname, pj_str_t *pvalue, pj_str_t *pname, pj_str_t *pvalue,
unsigned opt); unsigned opt);
PJ_DECL(void) pjsip_concat_param_imp(pj_str_t *param, pj_pool_t *pool, PJ_DECL(void) pjsip_concat_param_imp(pj_str_t *param, pj_pool_t *pool,
const pj_str_t *pname, const pj_str_t *pname,
const pj_str_t *pvalue, const pj_str_t *pvalue,
int sepchar); int sepchar);
PJ_DECL(void) pjsip_parse_end_hdr_imp ( pj_scanner *scanner ); PJ_DECL(void) pjsip_parse_end_hdr_imp ( pj_scanner *scanner );
/* Parse generic array header */
PJ_DECL(void) pjsip_parse_generic_array_hdr_imp(pjsip_generic_array_hdr *hd
r,
pj_scanner *scanner);
PJ_END_DECL PJ_END_DECL
#endif /* __PJSIP_SIP_PARSER_H__ */ #endif /* __PJSIP_SIP_PARSER_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 sip_regc.h   sip_regc.h 
/* $Id: sip_regc.h 4173 2012-06-20 10:39:05Z ming $ */ /* $Id: sip_regc.h 4586 2013-09-04 10:07:45Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 84 skipping to change at line 84
pjsip_rx_data *rdata; /**< The complete received response. */ pjsip_rx_data *rdata; /**< The complete received response. */
int expiration;/**< Next expiration interval. */ int expiration;/**< Next expiration interval. */
int contact_cnt;/**<Number of contacts in respo nse. */ int contact_cnt;/**<Number of contacts in respo nse. */
pjsip_contact_hdr *contact[PJSIP_REGC_MAX_CONTACT]; /**< Contacts. */ pjsip_contact_hdr *contact[PJSIP_REGC_MAX_CONTACT]; /**< Contacts. */
}; };
/** Type declaration for callback to receive registration result. */ /** Type declaration for callback to receive registration result. */
typedef void pjsip_regc_cb(struct pjsip_regc_cbparam *param); typedef void pjsip_regc_cb(struct pjsip_regc_cbparam *param);
/** /**
* Structure to hold parameters when calling application's callback
* specified in #pjsip_regc_set_reg_tsx_cb().
* To update contact address, application can set the field contact_cnt
* and contact inside the callback.
*/
struct pjsip_regc_tsx_cb_param
{
struct pjsip_regc_cbparam cbparam;
int contact_cnt;
pj_str_t contact[PJSIP_REGC_MAX_CONTACT];
};
/** Type declaration for callback set in #pjsip_regc_set_reg_tsx_cb(). */
typedef void pjsip_regc_tsx_cb(struct pjsip_regc_tsx_cb_param *param);
/**
* Client registration information. * Client registration information.
*/ */
struct pjsip_regc_info struct pjsip_regc_info
{ {
pj_str_t server_uri; /**< Server URI, */ pj_str_t server_uri; /**< Server URI, */
pj_str_t client_uri; /**< Client URI (From header). */ pj_str_t client_uri; /**< Client URI (From header). */
pj_bool_t is_busy; /**< Have pending transaction? */ pj_bool_t is_busy; /**< Have pending transaction? */
pj_bool_t auto_reg; /**< Will register automatically? */ pj_bool_t auto_reg; /**< Will register automatically? */
int interval; /**< Registration interval (seconds). */ int interval; /**< Registration interval (seconds). */
int next_reg; /**< Time until next registration (secon ds). */ int next_reg; /**< Time until next registration (secon ds). */
skipping to change at line 187 skipping to change at line 203
*/ */
PJ_DECL(pj_status_t) pjsip_regc_init(pjsip_regc *regc, PJ_DECL(pj_status_t) pjsip_regc_init(pjsip_regc *regc,
const pj_str_t *srv_url, const pj_str_t *srv_url,
const pj_str_t *from_url, const pj_str_t *from_url,
const pj_str_t *to_url, const pj_str_t *to_url,
int ccnt, int ccnt,
const pj_str_t contact[], const pj_str_t contact[],
pj_uint32_t expires); pj_uint32_t expires);
/** /**
* Set callback to be called when the registration received a final respons
e.
* This callback is different with the one specified during creation via
* #pjsip_regc_create(). This callback will be called for any final respons
e
* (including 401/407/423) and before any subsequent requests are sent.
* In case of unregistration, this callback will not be called.
*
* @param regc The client registration structure.
* @param tsx_cb Pointer to callback function to receive registration st
atus.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjsip_regc_set_reg_tsx_cb(pjsip_regc *regc,
pjsip_regc_tsx_cb *tsx_cb);
/**
* Set the "sent-by" field of the Via header for outgoing requests. * Set the "sent-by" field of the Via header for outgoing requests.
* *
* @param regc The client registration structure. * @param regc The client registration structure.
* @param via_addr Set via_addr to use for the Via header or NULL to use * @param via_addr Set via_addr to use for the Via header or NULL to use
* the transport's published name. * the transport's published name.
* @param via_tp via_addr will only be used if we are using via_tp * @param via_tp via_addr will only be used if we are using via_tp
* transport. * transport.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 35 lines changed or added


 sip_timer.h   sip_timer.h 
/* $Id: sip_timer.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_timer.h 4715 2014-01-24 09:32:27Z riza $ */
/* /*
* Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 192 skipping to change at line 192
* @param st_code Output buffer to store corresponding SIP status code * @param st_code Output buffer to store corresponding SIP status code
* when function returning non-PJ_SUCCESS. * when function returning non-PJ_SUCCESS.
* *
* @return PJ_SUCCESS on successful. * @return PJ_SUCCESS on successful.
*/ */
PJ_DECL(pj_status_t) pjsip_timer_process_resp(pjsip_inv_session *inv, PJ_DECL(pj_status_t) pjsip_timer_process_resp(pjsip_inv_session *inv,
const pjsip_rx_data *rdata, const pjsip_rx_data *rdata,
pjsip_status_code *st_code); pjsip_status_code *st_code);
/** /**
* Process Session Timers refresh error, this function will process
* error from refresh request. The error will be handle according the
* error code, i.e : BYE will be sent after error 503 (Transport Error).
*
* @param inv The invite session.
* @param event The event that trigger the error.
*
* @return PJ_SUCCESS on successful.
*/
PJ_DECL(pj_status_t) pjsip_timer_handle_refresh_error(
pjsip_inv_session *inv,
pjsip_event *event);
/**
* Process Session Timers headers in incoming request, this function * Process Session Timers headers in incoming request, this function
* will only process incoming INVITE and UPDATE request. * will only process incoming INVITE and UPDATE request.
* *
* This function will be called internally by the invite session if it * This function will be called internally by the invite session if it
* detects that the session needs Session Timers support. * detects that the session needs Session Timers support.
* *
* @param inv The invite session. * @param inv The invite session.
* @param rdata Incoming INVITE or UPDATE request. * @param rdata Incoming INVITE or UPDATE request.
* @param st_code Output buffer to store corresponding SIP status code * @param st_code Output buffer to store corresponding SIP status code
* when function returning non-PJ_SUCCESS. * when function returning non-PJ_SUCCESS.
 End of changes. 2 change blocks. 
1 lines changed or deleted 15 lines changed or added


 sip_transaction.h   sip_transaction.h 
/* $Id: sip_transaction.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_transaction.h 4420 2013-03-05 11:59:54Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 87 skipping to change at line 87
* is used to handle both UAS and UAC transaction. * is used to handle both UAS and UAC transaction.
*/ */
struct pjsip_transaction struct pjsip_transaction
{ {
/* /*
* Administrivia * Administrivia
*/ */
pj_pool_t *pool; /**< Pool owned by the tsx. */ pj_pool_t *pool; /**< Pool owned by the tsx. */
pjsip_module *tsx_user; /**< Transaction user. */ pjsip_module *tsx_user; /**< Transaction user. */
pjsip_endpoint *endpt; /**< Endpoint instance. */ pjsip_endpoint *endpt; /**< Endpoint instance. */
pj_mutex_t *mutex; /**< Mutex for this tsx. pj_bool_t terminating; /**< terminate() was called
*/ */
pj_grp_lock_t *grp_lock; /**< Transaction grp lock.
*/
pj_mutex_t *mutex_b; /**< Second mutex to avoid pj_mutex_t *mutex_b; /**< Second mutex to avoid
deadlock. It is used to deadlock. It is used to
protect timer. */ protect timer. */
/* /*
* Transaction identification. * Transaction identification.
*/ */
char obj_name[PJ_MAX_OBJ_NAME]; /**< Log info. */ char obj_name[PJ_MAX_OBJ_NAME]; /**< Log info. */
pjsip_role_e role; /**< Role (UAS or UAC) */ pjsip_role_e role; /**< Role (UAS or UAC) */
pjsip_method method; /**< The method. */ pjsip_method method; /**< The method. */
skipping to change at line 214 skipping to change at line 215
* @param tdata The outgoing request message. * @param tdata The outgoing request message.
* @param p_tsx On return will contain the new transaction insta nce. * @param p_tsx On return will contain the new transaction insta nce.
* *
* @return PJ_SUCCESS if successfull. * @return PJ_SUCCESS if successfull.
*/ */
PJ_DECL(pj_status_t) pjsip_tsx_create_uac( pjsip_module *tsx_user, PJ_DECL(pj_status_t) pjsip_tsx_create_uac( pjsip_module *tsx_user,
pjsip_tx_data *tdata, pjsip_tx_data *tdata,
pjsip_transaction **p_tsx); pjsip_transaction **p_tsx);
/** /**
* Variant of pjsip_tsx_create_uac() with additional parameter to specify
* the group lock to use. Group lock can be used to synchronize locking
* among several objects to prevent deadlock, and to synchronize the
* lifetime of objects sharing the same group lock.
*
* See pjsip_tsx_create_uac() for general info about this function.
*
* @param tsx_user Module to be registered as transaction user of the new
* transaction, which will receive notification from the
* transaction via on_tsx_state() callback.
* @param tdata The outgoing request message.
* @param grp_lock Optional group lock to use by this transaction. If
* the value is NULL, the transaction will create its
* own group lock.
* @param p_tsx On return will contain the new transaction insta
nce.
*
* @return PJ_SUCCESS if successfull.
*/
PJ_DECL(pj_status_t) pjsip_tsx_create_uac2(pjsip_module *tsx_user,
pjsip_tx_data *tdata,
pj_grp_lock_t *grp_lock,
pjsip_transaction **p_tsx);
/**
* Create, initialize, and register a new transaction as UAS from the * Create, initialize, and register a new transaction as UAS from the
* specified incoming request in \c rdata. After calling this function, * specified incoming request in \c rdata. After calling this function,
* application MUST call #pjsip_tsx_recv_msg() so that transaction * application MUST call #pjsip_tsx_recv_msg() so that transaction
* moves from state NULL. * moves from state NULL.
* *
* @param tsx_user Module to be registered as transaction user of the new * @param tsx_user Module to be registered as transaction user of the new
* transaction, which will receive notification from the * transaction, which will receive notification from the
* transaction via on_tsx_state() callback. * transaction via on_tsx_state() callback.
* @param rdata The received incoming request. * @param rdata The received incoming request.
* @param p_tsx On return will contain the new transaction insta nce. * @param p_tsx On return will contain the new transaction insta nce.
* *
* @return PJ_SUCCESS if successfull. * @return PJ_SUCCESS if successfull.
*/ */
PJ_DECL(pj_status_t) pjsip_tsx_create_uas( pjsip_module *tsx_user, PJ_DECL(pj_status_t) pjsip_tsx_create_uas( pjsip_module *tsx_user,
pjsip_rx_data *rdata, pjsip_rx_data *rdata,
pjsip_transaction **p_tsx ); pjsip_transaction **p_tsx );
/** /**
* Variant of pjsip_tsx_create_uas() with additional parameter to specify
* the group lock to use. Group lock can be used to synchronize locking
* among several objects to prevent deadlock, and to synchronize the
* lifetime of objects sharing the same group lock.
*
* See pjsip_tsx_create_uas() for general info about this function.
*
* @param tsx_user Module to be registered as transaction user of the new
* transaction, which will receive notification from the
* transaction via on_tsx_state() callback.
* @param rdata The received incoming request.
* @param grp_lock Optional group lock to use by this transaction. If
* the value is NULL, the transaction will create its
* own group lock.
* @param p_tsx On return will contain the new transaction insta
nce.
*
* @return PJ_SUCCESS if successfull.
*/
PJ_DECL(pj_status_t) pjsip_tsx_create_uas2(pjsip_module *tsx_user,
pjsip_rx_data *rdata,
pj_grp_lock_t *grp_lock,
pjsip_transaction **p_tsx );
/**
* Lock/bind transaction to a specific transport/listener. This is optional , * Lock/bind transaction to a specific transport/listener. This is optional ,
* as normally transport will be selected automatically based on the * as normally transport will be selected automatically based on the
* destination of the message upon resolver completion. * destination of the message upon resolver completion.
* *
* @param tsx The transaction. * @param tsx The transaction.
* @param sel Transport selector containing the specification of * @param sel Transport selector containing the specification of
* transport or listener to be used by this transaction * transport or listener to be used by this transaction
* to send requests. * to send requests.
* *
* @return PJ_SUCCESS on success, or the appropriate error code. * @return PJ_SUCCESS on success, or the appropriate error code.
 End of changes. 4 change blocks. 
3 lines changed or deleted 55 lines changed or added


 sip_transport_tcp.h   sip_transport_tcp.h 
/* $Id: sip_transport_tcp.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: sip_transport_tcp.h 4506 2013-04-26 06:01:43Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 65 skipping to change at line 65
*/ */
int af; int af;
/** /**
* Optional address to bind the socket to. Default is to bind to * Optional address to bind the socket to. Default is to bind to
* PJ_INADDR_ANY and to any available port. * PJ_INADDR_ANY and to any available port.
*/ */
pj_sockaddr bind_addr; pj_sockaddr bind_addr;
/** /**
* Should SO_REUSEADDR be used for the listener socket.
* Default value is PJSIP_TCP_TRANSPORT_REUSEADDR.
*/
pj_bool_t reuse_addr;
/**
* Optional published address, which is the address to be * Optional published address, which is the address to be
* advertised as the address of this SIP transport. * advertised as the address of this SIP transport.
* By default the bound address will be used as the published address. * By default the bound address will be used as the published address.
*/ */
pjsip_host_port addr_name; pjsip_host_port addr_name;
/** /**
* Number of simultaneous asynchronous accept() operations to be * Number of simultaneous asynchronous accept() operations to be
* supported. It is recommended that the number here corresponds to * supported. It is recommended that the number here corresponds to
* the number of processors in the system (or the number of SIP * the number of processors in the system (or the number of SIP
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added


 sip_transport_tls.h   sip_transport_tls.h 
/* $Id: sip_transport_tls.h 4262 2012-09-20 06:00:23Z bennylp $ */ /* $Id: sip_transport_tls.h 4506 2013-04-26 06:01:43Z bennylp $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 173 skipping to change at line 173
pj_bool_t require_client_cert; pj_bool_t require_client_cert;
/** /**
* TLS negotiation timeout to be applied for both outgoing and * TLS negotiation timeout to be applied for both outgoing and
* incoming connection. If both sec and msec member is set to zero, * incoming connection. If both sec and msec member is set to zero,
* the SSL negotiation doesn't have a timeout. * the SSL negotiation doesn't have a timeout.
*/ */
pj_time_val timeout; pj_time_val timeout;
/** /**
* Should SO_REUSEADDR be used for the listener socket.
* Default value is PJSIP_TLS_TRANSPORT_REUSEADDR.
*/
pj_bool_t reuse_addr;
/**
* QoS traffic type to be set on this transport. When application wants * QoS traffic type to be set on this transport. When application wants
* to apply QoS tagging to the transport, it's preferable to set this * to apply QoS tagging to the transport, it's preferable to set this
* field rather than \a qos_param fields since this is more portable. * field rather than \a qos_param fields since this is more portable.
* *
* Default value is PJ_QOS_TYPE_BEST_EFFORT. * Default value is PJ_QOS_TYPE_BEST_EFFORT.
*/ */
pj_qos_type qos_type; pj_qos_type qos_type;
/** /**
* Set the low level QoS parameters to the transport. This is a lower * Set the low level QoS parameters to the transport. This is a lower
skipping to change at line 222 skipping to change at line 228
} pjsip_tls_state_info; } pjsip_tls_state_info;
/** /**
* Initialize TLS setting with default values. * Initialize TLS setting with default values.
* *
* @param tls_opt The TLS setting to be initialized. * @param tls_opt The TLS setting to be initialized.
*/ */
PJ_INLINE(void) pjsip_tls_setting_default(pjsip_tls_setting *tls_opt) PJ_INLINE(void) pjsip_tls_setting_default(pjsip_tls_setting *tls_opt)
{ {
pj_memset(tls_opt, 0, sizeof(*tls_opt)); pj_memset(tls_opt, 0, sizeof(*tls_opt));
tls_opt->reuse_addr = PJSIP_TLS_TRANSPORT_REUSEADDR;
tls_opt->qos_type = PJ_QOS_TYPE_BEST_EFFORT; tls_opt->qos_type = PJ_QOS_TYPE_BEST_EFFORT;
tls_opt->qos_ignore_error = PJ_TRUE; tls_opt->qos_ignore_error = PJ_TRUE;
} }
/** /**
* Copy TLS setting. * Copy TLS setting.
* *
* @param pool The pool to duplicate strings etc. * @param pool The pool to duplicate strings etc.
* @param dst Destination structure. * @param dst Destination structure.
* @param src Source structure. * @param src Source structure.
 End of changes. 3 change blocks. 
1 lines changed or deleted 8 lines changed or added


 sip_uri.h   sip_uri.h 
/* $Id: sip_uri.h 4370 2013-02-26 05:30:00Z nanang $ */ /* $Id: sip_uri.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 298 skipping to change at line 298
* @param context Print context. * @param context Print context.
* @param uri The URI to print. * @param uri The URI to print.
* @param buf The buffer. * @param buf The buffer.
* @param size Size of the buffer. * @param size Size of the buffer.
* @return Length printed. * @return Length printed.
*/ */
PJ_INLINE(int) pjsip_uri_print(pjsip_uri_context_e context, PJ_INLINE(int) pjsip_uri_print(pjsip_uri_context_e context,
const void *uri, const void *uri,
char *buf, pj_size_t size) char *buf, pj_size_t size)
{ {
return (*((const pjsip_uri*)uri)->vptr->p_print)(context, uri, buf, siz return (int)(*((const pjsip_uri*)uri)->vptr->p_print)(context, uri,
e); buf, size);
} }
/** /**
* Generic function to clone an URI object. * Generic function to clone an URI object.
* *
* @param pool Pool. * @param pool Pool.
* @param uri URI to clone. * @param uri URI to clone.
* @return New URI. * @return New URI.
*/ */
PJ_INLINE(void*) pjsip_uri_clone( pj_pool_t *pool, const void *uri ) PJ_INLINE(void*) pjsip_uri_clone( pj_pool_t *pool, const void *uri )
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 sock.h   sock.h 
/* $Id: sock.h 4343 2013-02-07 09:35:34Z nanang $ */ /* $Id: sock.h 4538 2013-06-19 09:06:55Z nanang $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 1284 skipping to change at line 1284
* *
* @return PJ_SUCCESS or the status code. * @return PJ_SUCCESS or the status code.
*/ */
PJ_DECL(pj_status_t) pj_sock_setsockopt( pj_sock_t sockfd, PJ_DECL(pj_status_t) pj_sock_setsockopt( pj_sock_t sockfd,
pj_uint16_t level, pj_uint16_t level,
pj_uint16_t optname, pj_uint16_t optname,
const void *optval, const void *optval,
int optlen); int optlen);
/** /**
* Helper function to set socket buffer size using #pj_sock_setsockopt()
* with capability to auto retry with lower buffer setting value until
* the highest possible value is successfully set.
*
* @param sockfd The socket descriptor.
* @param optname The option name, valid values are pj_SO_RCVBUF()
* and pj_SO_SNDBUF().
* @param auto_retry Option whether auto retry with lower value is
* enabled.
* @param buf_size On input, specify the prefered buffer size setting,
* on output, the buffer size setting applied.
*
* @return PJ_SUCCESS or the status code.
*/
PJ_DECL(pj_status_t) pj_sock_setsockopt_sobuf( pj_sock_t sockfd,
pj_uint16_t optname,
pj_bool_t auto_retry,
unsigned *buf_size);
/**
* Receives data stream or message coming to the specified socket. * Receives data stream or message coming to the specified socket.
* *
* @param sockfd The socket descriptor. * @param sockfd The socket descriptor.
* @param buf The buffer to receive the data or message. * @param buf The buffer to receive the data or message.
* @param len On input, the length of the buffer. On return, * @param len On input, the length of the buffer. On return,
* contains the length of data received. * contains the length of data received.
* @param flags Flags (such as pj_MSG_PEEK()). * @param flags Flags (such as pj_MSG_PEEK()).
* *
* @return PJ_SUCCESS or the error code. * @return PJ_SUCCESS or the error code.
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 21 lines changed or added


 socket.h   socket.h 
/* $Id: socket.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: socket.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 153 skipping to change at line 153
#endif #endif
#if defined(PJ_HAS_SYS_SOCKIO_H) && PJ_HAS_SYS_SOCKIO_H != 0 #if defined(PJ_HAS_SYS_SOCKIO_H) && PJ_HAS_SYS_SOCKIO_H != 0
# include <sys/sockio.h> # include <sys/sockio.h>
#endif #endif
/* /*
* Define common errors. * Define common errors.
*/ */
#if (defined(PJ_WIN32) && PJ_WIN32!=0) || \ #if (defined(PJ_WIN32) && PJ_WIN32!=0) || \
(defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0) (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0) || \
(defined(PJ_WIN64) && PJ_WIN64!=0)
# define OSERR_EWOULDBLOCK WSAEWOULDBLOCK # define OSERR_EWOULDBLOCK WSAEWOULDBLOCK
# define OSERR_EINPROGRESS WSAEINPROGRESS # define OSERR_EINPROGRESS WSAEINPROGRESS
# define OSERR_ECONNRESET WSAECONNRESET # define OSERR_ECONNRESET WSAECONNRESET
# define OSERR_ENOTCONN WSAENOTCONN # define OSERR_ENOTCONN WSAENOTCONN
#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 #elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
# define OSERR_EWOULDBLOCK -1 # define OSERR_EWOULDBLOCK -1
# define OSERR_EINPROGRESS -1 # define OSERR_EINPROGRESS -1
# define OSERR_ECONNRESET -1 # define OSERR_ECONNRESET -1
# define OSERR_ENOTCONN -1 # define OSERR_ENOTCONN -1
#else #else
skipping to change at line 175 skipping to change at line 176
# define OSERR_EINPROGRESS EINPROGRESS # define OSERR_EINPROGRESS EINPROGRESS
# define OSERR_ECONNRESET ECONNRESET # define OSERR_ECONNRESET ECONNRESET
# define OSERR_ENOTCONN ENOTCONN # define OSERR_ENOTCONN ENOTCONN
#endif #endif
/* /*
* And undefine these.. * And undefine these..
*/ */
#undef s_addr #undef s_addr
#undef s6_addr #undef s6_addr
#undef sin_zero
/* /*
* Linux kernel specifics * Linux kernel specifics
*/ */
#if defined(PJ_LINUX_KERNEL) #if defined(PJ_LINUX_KERNEL)
# include <linux/net.h> # include <linux/net.h>
# include <asm/ioctls.h> /* FIONBIO */ # include <asm/ioctls.h> /* FIONBIO */
# include <linux/syscalls.h> /* sys_select() */ # include <linux/syscalls.h> /* sys_select() */
# include <asm/uaccess.h> /* set/get_fs() */ # include <asm/uaccess.h> /* set/get_fs() */
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 ssl_sock.h   ssl_sock.h 
/* $Id: ssl_sock.h 4146 2012-05-30 06:35:59Z nanang $ */ /* $Id: ssl_sock.h 4506 2013-04-26 06:01:43Z bennylp $ */
/* /*
* Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 697 skipping to change at line 697
* (perform outgoing connection) and the server may host multiple * (perform outgoing connection) and the server may host multiple
* 'virtual' servers at a single underlying network address, setting * 'virtual' servers at a single underlying network address, setting
* this will allow client to tell the server a name of the server * this will allow client to tell the server a name of the server
* it is contacting. * it is contacting.
* *
* Default value is zero/not-set. * Default value is zero/not-set.
*/ */
pj_str_t server_name; pj_str_t server_name;
/** /**
* Specify if SO_REUSEADDR should be used for listening socket. This
* option will only be used with accept() operation.
*
* Default is PJ_FALSE.
*/
pj_bool_t reuse_addr;
/**
* QoS traffic type to be set on this transport. When application wants * QoS traffic type to be set on this transport. When application wants
* to apply QoS tagging to the transport, it's preferable to set this * to apply QoS tagging to the transport, it's preferable to set this
* field rather than \a qos_param fields since this is more portable. * field rather than \a qos_param fields since this is more portable.
* *
* Default value is PJ_QOS_TYPE_BEST_EFFORT. * Default value is PJ_QOS_TYPE_BEST_EFFORT.
*/ */
pj_qos_type qos_type; pj_qos_type qos_type;
/** /**
* Set the low level QoS parameters to the transport. This is a lower * Set the low level QoS parameters to the transport. This is a lower
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added


 stream.h   stream.h 
/* $Id: stream.h 3841 2011-10-24 09:28:13Z ming $ */ /* $Id: stream.h 4739 2014-02-11 04:46:49Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 332 skipping to change at line 332
*/ */
PJ_DECL(pj_status_t) pjmedia_stream_resume(pjmedia_stream *stream, PJ_DECL(pj_status_t) pjmedia_stream_resume(pjmedia_stream *stream,
pjmedia_dir dir); pjmedia_dir dir);
/** /**
* Transmit DTMF to this stream. The DTMF will be transmitted uisng * Transmit DTMF to this stream. The DTMF will be transmitted uisng
* RTP telephone-events as described in RFC 2833. This operation is * RTP telephone-events as described in RFC 2833. This operation is
* only valid for audio stream. * only valid for audio stream.
* *
* @param stream The media stream. * @param stream The media stream.
* @param ascii_digit String containing digits to be sent to remote. * @param ascii_digit String containing digits to be sent to remote as
* described on RFC 2833 section 3.10. Character 'R' is
* used to represent the event type 16 (flash) as state
d
* in RFC 4730.
* Currently the maximum number of digits are 32. * Currently the maximum number of digits are 32.
* *
* @return PJ_SUCCESS on success. * @return PJ_SUCCESS on success.
*/ */
PJ_DECL(pj_status_t) pjmedia_stream_dial_dtmf(pjmedia_stream *stream, PJ_DECL(pj_status_t) pjmedia_stream_dial_dtmf(pjmedia_stream *stream,
const pj_str_t *ascii_digit); const pj_str_t *ascii_digit);
/** /**
* Check if the stream has incoming DTMF digits in the incoming DTMF * Check if the stream has incoming DTMF digits in the incoming DTMF
* queue. Incoming DTMF digits received via RFC 2833 mechanism are * queue. Incoming DTMF digits received via RFC 2833 mechanism are
 End of changes. 2 change blocks. 
2 lines changed or deleted 6 lines changed or added


 string.h   string.h 
/* $Id: string.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: string.h 4704 2014-01-16 05:30:46Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 535 skipping to change at line 535
* generated string is not NULL terminated. * generated string is not NULL terminated.
* *
* @param str the string to store the result. * @param str the string to store the result.
* @param length the length of the random string to generate. * @param length the length of the random string to generate.
* *
* @return the string. * @return the string.
*/ */
PJ_DECL(char*) pj_create_random_string(char *str, pj_size_t length); PJ_DECL(char*) pj_create_random_string(char *str, pj_size_t length);
/** /**
* Convert string to signed integer. The conversion will stop as
* soon as non-digit character is found or all the characters have
* been processed.
*
* @param str the string.
*
* @return the integer.
*/
PJ_DECL(long) pj_strtol(const pj_str_t *str);
/**
* Convert string to unsigned integer. The conversion will stop as * Convert string to unsigned integer. The conversion will stop as
* soon as non-digit character is found or all the characters have * soon as non-digit character is found or all the characters have
* been processed. * been processed.
* *
* @param str the string. * @param str the string.
* *
* @return the unsigned integer. * @return the unsigned integer.
*/ */
PJ_DECL(unsigned long) pj_strtoul(const pj_str_t *str); PJ_DECL(unsigned long) pj_strtoul(const pj_str_t *str);
skipping to change at line 563 skipping to change at line 574
* @param endptr Optional pointer to receive the remainder/unparsed * @param endptr Optional pointer to receive the remainder/unparsed
* portion of the input. * portion of the input.
* @param base Number base to use. * @param base Number base to use.
* *
* @return the unsigned integer number. * @return the unsigned integer number.
*/ */
PJ_DECL(unsigned long) pj_strtoul2(const pj_str_t *str, pj_str_t *endptr, PJ_DECL(unsigned long) pj_strtoul2(const pj_str_t *str, pj_str_t *endptr,
unsigned base); unsigned base);
/** /**
* Convert string to float.
*
* @param str the string.
*
* @return the value.
*/
PJ_DECL(float) pj_strtof(const pj_str_t *str);
/**
* Utility to convert unsigned integer to string. Note that the * Utility to convert unsigned integer to string. Note that the
* string will be NULL terminated. * string will be NULL terminated.
* *
* @param val the unsigned integer value. * @param val the unsigned integer value.
* @param buf the buffer * @param buf the buffer
* *
* @return the number of characters written * @return the number of characters written
*/ */
PJ_DECL(int) pj_utoa(unsigned long val, char *buf); PJ_DECL(int) pj_utoa(unsigned long val, char *buf);
 End of changes. 3 change blocks. 
1 lines changed or deleted 21 lines changed or added


 string_i.h   string_i.h 
/* $Id: string_i.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: string_i.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 147 skipping to change at line 147
return dst; return dst;
} }
PJ_IDEF(int) pj_strcmp( const pj_str_t *str1, const pj_str_t *str2) PJ_IDEF(int) pj_strcmp( const pj_str_t *str1, const pj_str_t *str2)
{ {
if (str1->slen == 0) { if (str1->slen == 0) {
return str2->slen==0 ? 0 : -1; return str2->slen==0 ? 0 : -1;
} else if (str2->slen == 0) { } else if (str2->slen == 0) {
return 1; return 1;
} else { } else {
int min = (str1->slen < str2->slen)? str1->slen : str2->slen; pj_size_t min = (str1->slen < str2->slen)? str1->slen : str2->slen;
int res = pj_memcmp(str1->ptr, str2->ptr, min); int res = pj_memcmp(str1->ptr, str2->ptr, min);
if (res == 0) { if (res == 0) {
return (str1->slen < str2->slen) ? -1 : return (str1->slen < str2->slen) ? -1 :
(str1->slen == str2->slen ? 0 : 1); (str1->slen == str2->slen ? 0 : 1);
} else { } else {
return res; return res;
} }
} }
} }
skipping to change at line 215 skipping to change at line 215
return pj_strcmp(str1, &copy2); return pj_strcmp(str1, &copy2);
} }
PJ_IDEF(int) pj_stricmp( const pj_str_t *str1, const pj_str_t *str2) PJ_IDEF(int) pj_stricmp( const pj_str_t *str1, const pj_str_t *str2)
{ {
if (str1->slen == 0) { if (str1->slen == 0) {
return str2->slen==0 ? 0 : -1; return str2->slen==0 ? 0 : -1;
} else if (str2->slen == 0) { } else if (str2->slen == 0) {
return 1; return 1;
} else { } else {
int min = (str1->slen < str2->slen)? str1->slen : str2->slen; pj_size_t min = (str1->slen < str2->slen)? str1->slen : str2->slen;
int res = pj_ansi_strnicmp(str1->ptr, str2->ptr, min); int res = pj_ansi_strnicmp(str1->ptr, str2->ptr, min);
if (res == 0) { if (res == 0) {
return (str1->slen < str2->slen) ? -1 : return (str1->slen < str2->slen) ? -1 :
(str1->slen == str2->slen ? 0 : 1); (str1->slen == str2->slen ? 0 : 1);
} else { } else {
return res; return res;
} }
} }
} }
skipping to change at line 357 skipping to change at line 357
PJ_IDEF(void) pj_strcat(pj_str_t *dst, const pj_str_t *src) PJ_IDEF(void) pj_strcat(pj_str_t *dst, const pj_str_t *src)
{ {
if (src->slen) { if (src->slen) {
pj_memcpy(dst->ptr + dst->slen, src->ptr, src->slen); pj_memcpy(dst->ptr + dst->slen, src->ptr, src->slen);
dst->slen += src->slen; dst->slen += src->slen;
} }
} }
PJ_IDEF(void) pj_strcat2(pj_str_t *dst, const char *str) PJ_IDEF(void) pj_strcat2(pj_str_t *dst, const char *str)
{ {
unsigned len = str? pj_ansi_strlen(str) : 0; pj_size_t len = str? pj_ansi_strlen(str) : 0;
if (len) { if (len) {
pj_memcpy(dst->ptr + dst->slen, str, len); pj_memcpy(dst->ptr + dst->slen, str, len);
dst->slen += len; dst->slen += len;
} }
} }
PJ_IDEF(pj_str_t*) pj_strtrim( pj_str_t *str ) PJ_IDEF(pj_str_t*) pj_strtrim( pj_str_t *str )
{ {
pj_strltrim(str); pj_strltrim(str);
pj_strrtrim(str); pj_strrtrim(str);
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 stun_session.h   stun_session.h 
/* $Id: stun_session.h 4360 2013-02-21 11:26:35Z bennylp $ */ /* $Id: stun_session.h 4606 2013-10-01 05:00:57Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 430 skipping to change at line 430
* Retrieve the user data previously associated to this STUN session with * Retrieve the user data previously associated to this STUN session with
* pj_stun_session_set_user_data(). * pj_stun_session_set_user_data().
* *
* @param sess The STUN session instance. * @param sess The STUN session instance.
* *
* @return The user data associated with this STUN session. * @return The user data associated with this STUN session.
*/ */
PJ_DECL(void*) pj_stun_session_get_user_data(pj_stun_session *sess); PJ_DECL(void*) pj_stun_session_get_user_data(pj_stun_session *sess);
/** /**
* Get the group lock for this STUN session.
*
* @param sess The STUN session instance.
*
* @return The group lock.
*/
PJ_DECL(pj_grp_lock_t *) pj_stun_session_get_grp_lock(pj_stun_session *sess
);
/**
* Set SOFTWARE name to be included in all requests and responses. * Set SOFTWARE name to be included in all requests and responses.
* *
* @param sess The STUN session instance. * @param sess The STUN session instance.
* @param sw Software name string. If this argument is NULL or * @param sw Software name string. If this argument is NULL or
* empty, the session will not include SOFTWARE attribute * empty, the session will not include SOFTWARE attribute
* in STUN requests and responses. * in STUN requests and responses.
* *
* @return PJ_SUCCESS on success, or the appropriate error code. * @return PJ_SUCCESS on success, or the appropriate error code.
*/ */
PJ_DECL(pj_status_t) pj_stun_session_set_software_name(pj_stun_session *ses s, PJ_DECL(pj_status_t) pj_stun_session_set_software_name(pj_stun_session *ses s,
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added


 stun_sock.h   stun_sock.h 
/* $Id: stun_sock.h 4360 2013-02-21 11:26:35Z bennylp $ */ /* $Id: stun_sock.h 4606 2013-10-01 05:00:57Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 292 skipping to change at line 292
pj_qos_params qos_params; pj_qos_params qos_params;
/** /**
* Specify if STUN socket should ignore any errors when setting the QoS * Specify if STUN socket should ignore any errors when setting the QoS
* traffic type/parameters. * traffic type/parameters.
* *
* Default: PJ_TRUE * Default: PJ_TRUE
*/ */
pj_bool_t qos_ignore_error; pj_bool_t qos_ignore_error;
/**
* Specify target value for socket receive buffer size. It will be
* applied using setsockopt(). When it fails to set the specified size,
* it will try with lower value until the highest possible is
* successfully set.
*
* Default: 0 (OS default)
*/
unsigned so_rcvbuf_size;
/**
* Specify target value for socket send buffer size. It will be
* applied using setsockopt(). When it fails to set the specified size,
* it will try with lower value until the highest possible is
* successfully set.
*
* Default: 0 (OS default)
*/
unsigned so_sndbuf_size;
} pj_stun_sock_cfg; } pj_stun_sock_cfg;
/** /**
* Retrieve the name representing the specified operation. * Retrieve the name representing the specified operation.
*/ */
PJ_DECL(const char*) pj_stun_sock_op_name(pj_stun_sock_op op); PJ_DECL(const char*) pj_stun_sock_op_name(pj_stun_sock_op op);
/** /**
* Initialize the STUN transport setting with its default values. * Initialize the STUN transport setting with its default values.
* *
skipping to change at line 404 skipping to change at line 424
* Retrieve the previously assigned user data associated with this STUN * Retrieve the previously assigned user data associated with this STUN
* transport. * transport.
* *
* @param stun_sock The STUN transport instance. * @param stun_sock The STUN transport instance.
* *
* @return The user/application data. * @return The user/application data.
*/ */
PJ_DECL(void*) pj_stun_sock_get_user_data(pj_stun_sock *stun_sock); PJ_DECL(void*) pj_stun_sock_get_user_data(pj_stun_sock *stun_sock);
/** /**
* Get the group lock for this STUN transport.
*
* @param stun_sock The STUN transport instance.
*
* @return The group lock.
*/
PJ_DECL(pj_grp_lock_t *) pj_stun_sock_get_grp_lock(pj_stun_sock *stun_sock)
;
/**
* Get the STUN transport info. The transport info contains, among other * Get the STUN transport info. The transport info contains, among other
* things, the allocated relay address. * things, the allocated relay address.
* *
* @param stun_sock The STUN transport instance. * @param stun_sock The STUN transport instance.
* @param info Pointer to be filled with STUN transport info. * @param info Pointer to be filled with STUN transport info.
* *
* @return PJ_SUCCESS if the operation has been successful, * @return PJ_SUCCESS if the operation has been successful,
* or the appropriate error code on failure. * or the appropriate error code on failure.
*/ */
PJ_DECL(pj_status_t) pj_stun_sock_get_info(pj_stun_sock *stun_sock, PJ_DECL(pj_status_t) pj_stun_sock_get_info(pj_stun_sock *stun_sock,
 End of changes. 3 change blocks. 
1 lines changed or deleted 31 lines changed or added


 timer.h   timer.h 
/* $Id: timer.h 4359 2013-02-21 11:18:36Z bennylp $ */ /* $Id: timer.h 4567 2013-07-19 06:31:28Z bennylp $ */
/* /*
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 212 skipping to change at line 212
* @param cb Callback function to be called when the timer elapses. * @param cb Callback function to be called when the timer elapses.
* *
* @return The timer entry itself. * @return The timer entry itself.
*/ */
PJ_DECL(pj_timer_entry*) pj_timer_entry_init( pj_timer_entry *entry, PJ_DECL(pj_timer_entry*) pj_timer_entry_init( pj_timer_entry *entry,
int id, int id,
void *user_data, void *user_data,
pj_timer_heap_callback *cb ); pj_timer_heap_callback *cb );
/** /**
* Queries whether a timer entry is currently running.
*
* @param entry The timer entry to query.
*
* @return PJ_TRUE if the timer is running. PJ_FALSE if not.
*/
PJ_DECL(pj_bool_t) pj_timer_entry_running( pj_timer_entry *entry );
/**
* Schedule a timer entry which will expire AFTER the specified delay. * Schedule a timer entry which will expire AFTER the specified delay.
* *
* @param ht The timer heap. * @param ht The timer heap.
* @param entry The entry to be registered. * @param entry The entry to be registered.
* @param delay The interval to expire. * @param delay The interval to expire.
* @return PJ_SUCCESS, or the appropriate error code. * @return PJ_SUCCESS, or the appropriate error code.
*/ */
#if PJ_TIMER_DEBUG #if PJ_TIMER_DEBUG
# define pj_timer_heap_schedule(ht,e,d) \ # define pj_timer_heap_schedule(ht,e,d) \
pj_timer_heap_schedule_dbg(ht,e,d,__FILE__,__LINE__) pj_timer_heap_schedule_dbg(ht,e,d,__FILE__,__LINE__)
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added


 transport_ice.h   transport_ice.h 
/* $Id: transport_ice.h 4350 2013-02-15 03:57:31Z nanang $ */ /* $Id: transport_ice.h 4606 2013-10-01 05:00:57Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 217 skipping to change at line 217
*/ */
PJ_DECL(pj_status_t) pjmedia_ice_create3(pjmedia_endpt *endpt, PJ_DECL(pj_status_t) pjmedia_ice_create3(pjmedia_endpt *endpt,
const char *name, const char *name,
unsigned comp_cnt, unsigned comp_cnt,
const pj_ice_strans_cfg *cfg, const pj_ice_strans_cfg *cfg,
const pjmedia_ice_cb *cb, const pjmedia_ice_cb *cb,
unsigned options, unsigned options,
void *user_data, void *user_data,
pjmedia_transport **p_tp); pjmedia_transport **p_tp);
/**
* Get the group lock for the ICE media transport.
*
* @param tp The ICE media transport.
*
* @return The group lock.
*/
PJ_DECL(pj_grp_lock_t *) pjmedia_ice_get_grp_lock(pjmedia_transport *tp);
PJ_END_DECL PJ_END_DECL
/** /**
* @} * @}
*/ */
#endif /* __PJMEDIA_TRANSPORT_ICE_H__ */ #endif /* __PJMEDIA_TRANSPORT_ICE_H__ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added


 turn_session.h   turn_session.h 
/* $Id: turn_session.h 4360 2013-02-21 11:26:35Z bennylp $ */ /* $Id: turn_session.h 4606 2013-10-01 05:00:57Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 500 skipping to change at line 500
* Retrieve the previously assigned user data associated with this TURN * Retrieve the previously assigned user data associated with this TURN
* session. * session.
* *
* @param sess The TURN client session. * @param sess The TURN client session.
* *
* @return The user/application data. * @return The user/application data.
*/ */
PJ_DECL(void*) pj_turn_session_get_user_data(pj_turn_session *sess); PJ_DECL(void*) pj_turn_session_get_user_data(pj_turn_session *sess);
/** /**
* Get the group lock for this TURN session.
*
* @param sess The TURN client session.
*
* @return The group lock.
*/
PJ_DECL(pj_grp_lock_t *) pj_turn_session_get_grp_lock(pj_turn_session *sess
);
/**
* Configure message logging. By default all flags are enabled. * Configure message logging. By default all flags are enabled.
* *
* @param sess The TURN client session. * @param sess The TURN client session.
* @param flags Bitmask combination of #pj_stun_sess_msg_log _flag * @param flags Bitmask combination of #pj_stun_sess_msg_log _flag
*/ */
PJ_DECL(void) pj_turn_session_set_log(pj_turn_session *sess, PJ_DECL(void) pj_turn_session_set_log(pj_turn_session *sess,
unsigned flags); unsigned flags);
/** /**
* Configure the SOFTWARE name to be sent in all STUN requests by the * Configure the SOFTWARE name to be sent in all STUN requests by the
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added


 turn_sock.h   turn_sock.h 
/* $Id: turn_sock.h 4360 2013-02-21 11:26:35Z bennylp $ */ /* $Id: turn_sock.h 4606 2013-10-01 05:00:57Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 165 skipping to change at line 165
/** /**
* Specify the port range for TURN socket binding, relative to the star t * Specify the port range for TURN socket binding, relative to the star t
* port number specified in \a bound_addr. Note that this setting is on ly * port number specified in \a bound_addr. Note that this setting is on ly
* applicable when the start port number is non zero. * applicable when the start port number is non zero.
* *
* Default value is zero. * Default value is zero.
*/ */
pj_uint16_t port_range; pj_uint16_t port_range;
/**
* Specify target value for socket receive buffer size. It will be
* applied using setsockopt(). When it fails to set the specified size,
* it will try with lower value until the highest possible has been
* successfully set.
*
* Default: 0 (OS default)
*/
unsigned so_rcvbuf_size;
/**
* Specify target value for socket send buffer size. It will be
* applied using setsockopt(). When it fails to set the specified size,
* it will try with lower value until the highest possible has been
* successfully set.
*
* Default: 0 (OS default)
*/
unsigned so_sndbuf_size;
} pj_turn_sock_cfg; } pj_turn_sock_cfg;
/** /**
* Initialize pj_turn_sock_cfg structure with default values. * Initialize pj_turn_sock_cfg structure with default values.
*/ */
PJ_DECL(void) pj_turn_sock_cfg_default(pj_turn_sock_cfg *cfg); PJ_DECL(void) pj_turn_sock_cfg_default(pj_turn_sock_cfg *cfg);
/** /**
* Create a TURN transport instance with the specified address family and * Create a TURN transport instance with the specified address family and
* connection type. Once TURN transport instance is created, application * connection type. Once TURN transport instance is created, application
skipping to change at line 240 skipping to change at line 260
* Retrieve the previously assigned user data associated with this TURN * Retrieve the previously assigned user data associated with this TURN
* transport. * transport.
* *
* @param turn_sock The TURN transport instance. * @param turn_sock The TURN transport instance.
* *
* @return The user/application data. * @return The user/application data.
*/ */
PJ_DECL(void*) pj_turn_sock_get_user_data(pj_turn_sock *turn_sock); PJ_DECL(void*) pj_turn_sock_get_user_data(pj_turn_sock *turn_sock);
/** /**
* Get the group lock for this TURN transport.
*
* @param turn_sock The TURN transport instance.
*
* @return The group lock.
*/
PJ_DECL(pj_grp_lock_t *) pj_turn_sock_get_grp_lock(pj_turn_sock *turn_sock)
;
/**
* Get the TURN transport info. The transport info contains, among other * Get the TURN transport info. The transport info contains, among other
* things, the allocated relay address. * things, the allocated relay address.
* *
* @param turn_sock The TURN transport instance. * @param turn_sock The TURN transport instance.
* @param info Pointer to be filled with TURN transport info. * @param info Pointer to be filled with TURN transport info.
* *
* @return PJ_SUCCESS if the operation has been successful, * @return PJ_SUCCESS if the operation has been successful,
* or the appropriate error code on failure. * or the appropriate error code on failure.
*/ */
PJ_DECL(pj_status_t) pj_turn_sock_get_info(pj_turn_sock *turn_sock, PJ_DECL(pj_status_t) pj_turn_sock_get_info(pj_turn_sock *turn_sock,
 End of changes. 3 change blocks. 
1 lines changed or deleted 31 lines changed or added


 types.h   types.h 
/* $Id: types.h 4359 2013-02-21 11:18:36Z bennylp $ */ /* $Id: types.h 4704 2014-01-16 05:30:46Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 60 skipping to change at line 60
/** Signed 8bit integer. */ /** Signed 8bit integer. */
typedef signed char pj_int8_t; typedef signed char pj_int8_t;
/** Unsigned 8bit integer. */ /** Unsigned 8bit integer. */
typedef unsigned char pj_uint8_t; typedef unsigned char pj_uint8_t;
/** Large unsigned integer. */ /** Large unsigned integer. */
typedef size_t pj_size_t; typedef size_t pj_size_t;
/** Large signed integer. */ /** Large signed integer. */
typedef long pj_ssize_t; #if defined(PJ_WIN64) && PJ_WIN64!=0
typedef pj_int64_t pj_ssize_t;
#else
typedef long pj_ssize_t;
#endif
/** Status code. */ /** Status code. */
typedef int pj_status_t; typedef int pj_status_t;
/** Boolean. */ /** Boolean. */
typedef int pj_bool_t; typedef int pj_bool_t;
/** Native char type, which will be equal to wchar_t for Unicode /** Native char type, which will be equal to wchar_t for Unicode
* and char for ANSI. */ * and char for ANSI. */
#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
skipping to change at line 84 skipping to change at line 88
#endif #endif
/** This macro creates Unicode or ANSI literal string depending whether /** This macro creates Unicode or ANSI literal string depending whether
* native platform string is Unicode or ANSI. */ * native platform string is Unicode or ANSI. */
#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
# define PJ_T(literal_str) L##literal_str # define PJ_T(literal_str) L##literal_str
#else #else
# define PJ_T(literal_str) literal_str # define PJ_T(literal_str) literal_str
#endif #endif
/** Status is OK. */ /** Some constants */
#define PJ_SUCCESS 0 enum pj_constants_
{
/** Status is OK. */
PJ_SUCCESS=0,
/** True value. */ /** True value. */
#define PJ_TRUE 1 PJ_TRUE=1,
/** False value. */ /** False value. */
#define PJ_FALSE 0 PJ_FALSE=0
};
/** /**
* File offset type. * File offset type.
*/ */
#if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0 #if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0
typedef pj_int64_t pj_off_t; typedef pj_int64_t pj_off_t;
#else #else
typedef pj_ssize_t pj_off_t; typedef pj_ssize_t pj_off_t;
#endif #endif
skipping to change at line 248 skipping to change at line 256
/** Event object. */ /** Event object. */
typedef struct pj_event_t pj_event_t; typedef struct pj_event_t pj_event_t;
/** Unidirectional stream pipe object. */ /** Unidirectional stream pipe object. */
typedef struct pj_pipe_t pj_pipe_t; typedef struct pj_pipe_t pj_pipe_t;
/** Operating system handle. */ /** Operating system handle. */
typedef void *pj_oshandle_t; typedef void *pj_oshandle_t;
/** Socket handle. */ /** Socket handle. */
typedef long pj_sock_t; #if defined(PJ_WIN64) && PJ_WIN64!=0
typedef pj_int64_t pj_sock_t;
#else
typedef long pj_sock_t;
#endif
/** Generic socket address. */ /** Generic socket address. */
typedef void pj_sockaddr_t; typedef void pj_sockaddr_t;
/** Forward declaration. */ /** Forward declaration. */
typedef struct pj_sockaddr_in pj_sockaddr_in; typedef struct pj_sockaddr_in pj_sockaddr_in;
/** Color type. */ /** Color type. */
typedef unsigned int pj_color_t; typedef unsigned int pj_color_t;
 End of changes. 6 change blocks. 
9 lines changed or deleted 21 lines changed or added


 unicode.h   unicode.h 
/* $Id: unicode.h 3553 2011-05-05 06:14:19Z nanang $ */ /* $Id: unicode.h 4537 2013-06-19 06:47:43Z riza $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
skipping to change at line 48 skipping to change at line 48
/** /**
* Convert ANSI strings to Unicode strings. * Convert ANSI strings to Unicode strings.
* *
* @param str The ANSI string to be converted. * @param str The ANSI string to be converted.
* @param len The length of the input string. * @param len The length of the input string.
* @param wbuf Buffer to hold the Unicode string output. * @param wbuf Buffer to hold the Unicode string output.
* @param wbuf_count Buffer size, in number of elements (not bytes). * @param wbuf_count Buffer size, in number of elements (not bytes).
* *
* @return The Unicode string, NULL terminated. * @return The Unicode string, NULL terminated.
*/ */
PJ_DECL(wchar_t*) pj_ansi_to_unicode(const char *str, pj_size_t len, PJ_DECL(wchar_t*) pj_ansi_to_unicode(const char *str, int len,
wchar_t *wbuf, pj_size_t wbuf_count); wchar_t *wbuf, int wbuf_count);
/** /**
* Convert Unicode string to ANSI string. * Convert Unicode string to ANSI string.
* *
* @param wstr The Unicode string to be converted. * @param wstr The Unicode string to be converted.
* @param len The length of the input string. * @param len The length of the input string.
* @param buf Buffer to hold the ANSI string output. * @param buf Buffer to hold the ANSI string output.
* @param buf_size Size of the output buffer. * @param buf_size Size of the output buffer.
* *
* @return The ANSI string, NULL terminated. * @return The ANSI string, NULL terminated.
*/ */
PJ_DECL(char*) pj_unicode_to_ansi(const wchar_t *wstr, pj_size_t len, PJ_DECL(char*) pj_unicode_to_ansi(const wchar_t *wstr, pj_ssize_t len,
char *buf, pj_size_t buf_size); char *buf, int buf_size);
#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
/** /**
* This macro is used to declare temporary Unicode buffer for ANSI to * This macro is used to declare temporary Unicode buffer for ANSI to
* Unicode conversion, and should be put in declaration section of a block. * Unicode conversion, and should be put in declaration section of a block.
* When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this
* macro will expand to nothing. * macro will expand to nothing.
*/ */
# define PJ_DECL_UNICODE_TEMP_BUF(buf,size) wchar_t buf[size]; # define PJ_DECL_UNICODE_TEMP_BUF(buf,size) wchar_t buf[size];
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 lines changed or added


 videodev.h   videodev.h 
/* $Id: videodev.h 4167 2012-06-15 08:13:43Z ming $ */ /* $Id: videodev.h 4704 2014-01-16 05:30:46Z ming $ */
/* /*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 131 skipping to change at line 131
/** /**
* Window can be resized. * Window can be resized.
*/ */
PJMEDIA_VID_DEV_WND_RESIZABLE = 2 PJMEDIA_VID_DEV_WND_RESIZABLE = 2
} pjmedia_vid_dev_wnd_flag; } pjmedia_vid_dev_wnd_flag;
/** /**
* Device index constants. * Device index constants.
*/ */
enum enum pjmedia_vid_dev_std_index
{ {
/** /**
* Constant to denote default capture device * Constant to denote default capture device
*/ */
PJMEDIA_VID_DEFAULT_CAPTURE_DEV = -1, PJMEDIA_VID_DEFAULT_CAPTURE_DEV = -1,
/** /**
* Constant to denote default render device * Constant to denote default render device
*/ */
PJMEDIA_VID_DEFAULT_RENDER_DEV = -2, PJMEDIA_VID_DEFAULT_RENDER_DEV = -2,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/