Merge remote-tracking branch 'origin/v1.2.stable' into v1.2.stable-ftdm_em_playback

This commit is contained in:
Moises Silva
2013-08-14 14:28:59 -04:00
269 changed files with 6997 additions and 5878 deletions
+44 -1
View File
@@ -238,16 +238,48 @@ opal
/ldns/Makefile
/ldns/packaging/ldns-config
/libcodec2/src/c2dec
/libcodec2/src/c2demo
/libcodec2/src/c2enc
/libcodec2/src/c2sim
/libcodec2/src/codebook.c
/libcodec2/src/codebookd.c
/libcodec2/src/codebookdt.c
/libcodec2/src/codebookge.c
/libcodec2/src/codebookjnd.c
/libcodec2/src/codebookjvm.c
/libcodec2/src/codebookvqanssi.c
/libcodec2/src/fdmdv_demod
/libcodec2/src/fdmdv_get_test_bits
/libcodec2/src/fdmdv_interleave
/libcodec2/src/fdmdv_mod
/libcodec2/src/fdmdv_put_test_bits
/libcodec2/src/generate_codebook
/libcodec2/src/genlspdtcb
/libcodec2/unittest/create_interleaver
/libcodec2/unittest/de
/libcodec2/unittest/extract
/libcodec2/unittest/genampdata
/libcodec2/unittest/genlsp
/libcodec2/unittest/genphdata
/libcodec2/unittest/genres
/libcodec2/unittest/lspsync
/libcodec2/unittest/polar2rect
/libcodec2/unittest/pre
/libcodec2/unittest/scalarlsptest
/libcodec2/unittest/t48_8
/libcodec2/unittest/tcodec2
/libcodec2/unittest/tfdmdv
/libcodec2/unittest/tfifo
/libcodec2/unittest/tinterp
/libcodec2/unittest/tlspsens
/libcodec2/unittest/tnlp
/libcodec2/unittest/tprede
/libcodec2/unittest/tquant
/libcodec2/unittest/vq_train_jvm
/libcodec2/unittest/vqtrain
/libcodec2/unittest/vqtrainjnd
/libcodec2/unittest/vqtrainph
/libcodec2/unittest/vqtrainsp
/libdingaling/build/compile
/libdingaling/Makefile
/libdingaling/Makefile.in
@@ -355,6 +387,11 @@ opal
/libwebsockets/compile
/libwebsockets/test-server/Makefile
/libwebsockets/test-server/Makefile.in
/libwebsockets/test-server/libwebsockets-test-client
/libwebsockets/test-server/libwebsockets-test-fraggle
/libwebsockets/test-server/libwebsockets-test-ping
/libwebsockets/test-server/libwebsockets-test-server
/libwebsockets/test-server/libwebsockets-test-server-extpoll
/mongo-cxx-driver-v*/
/mpg123/
/libmpg123/
@@ -558,11 +595,13 @@ opal
/spandsp/src/Makefile.in
/spandsp/src/make_math_fixed_tables
/spandsp/src/make_modem_filter
/spandsp/src/make_t43_gray_code_tables
/spandsp/src/math_fixed_tables.h
/spandsp/src/msvc/All/BuildLog make_at_dictionary.htm
/spandsp/src/msvc/All/BuildLog make_modem_filter.htm
/spandsp/src/spandsp.h
/spandsp/src/stamp-h1
/spandsp/src/t43_gray_code_tables.h
/spandsp/src/v17_v32bis_rx_fixed_rrc.h
/spandsp/src/v17_v32bis_rx_floating_rrc.h
/spandsp/src/v17_v32bis_tx_fixed_rrc.h
@@ -923,9 +962,12 @@ opal
/sipcc/Makefile
/sipcc/Makefile.in
/yaml/
/yaml/Makefile
/yaml/config.h
/yaml/include/Makefile
/yaml/src/Makefile
/yaml/stamp-h1
/yaml/tests/Makefile
/yaml/tests/example-deconstructor
/yaml/tests/example-deconstructor-alt
/yaml/tests/example-reformatter
@@ -935,6 +977,7 @@ opal
/yaml/tests/run-loader
/yaml/tests/run-parser
/yaml/tests/run-scanner
/zeromq-*/
/jpeg-8d/
+25 -5
View File
@@ -57,6 +57,7 @@ typedef struct {
int debug;
const char *console_fnkeys[12];
char loglevel[128];
int log_uuid;
int quiet;
int batch_mode;
char prompt_color[12];
@@ -595,6 +596,7 @@ static const char *usage_str =
" -i, --interrupt Allow Control-c to interrupt\n"
" -x, --execute=command Execute Command and Exit\n"
" -l, --loglevel=command Log Level\n"
" -U, --log-uuid Include UUID in log output\n"
" -q, --quiet Disable logging\n"
" -r, --retry Retry connection on failure\n"
" -R, --reconnect Reconnect if disconnected\n"
@@ -745,10 +747,14 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
if (aok) {
if (feature_level) clear_line();
if(!(global_profile->batch_mode)) {
printf("%s%s", colors[level], handle->last_event->body);
printf("%s", colors[level]);
}
if (global_profile->log_uuid && !esl_strlen_zero(userdata)) {
printf("%s ", userdata);
}
printf("%s", handle->last_event->body);
if(!(global_profile->batch_mode)) {
if (!feature_level) printf("%s", ESL_SEQ_DEFAULT_COLOR);
} else {
printf("%s", handle->last_event->body);
}
if (feature_level) redisplay();
}
@@ -757,6 +763,10 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
if(!(global_profile->batch_mode)) {
SetConsoleTextAttribute(hStdout, colors[level]);
}
if (global_profile->log_uuid && !esl_strlen_zero(userdata)) {
WriteFile(hStdout, userdata, (DWORD)strlen(userdata), &outbytes, NULL);
WriteFile(hStdout, " ", (DWORD)strlen(" "), &outbytes, NULL);
}
WriteFile(hStdout, handle->last_event->body, len, &outbytes, NULL);
if(!(global_profile->batch_mode)) {
SetConsoleTextAttribute(hStdout, wOldColorAttrs);
@@ -1191,7 +1201,7 @@ static void read_config(const char *dft_cfile, const char *cfile) {
if (strcmp(cur_cat, cfg.category)) {
esl_set_string(cur_cat, cfg.category);
esl_set_string(profiles[pcount].name, cur_cat);
esl_set_string(profiles[pcount].host, "localhost");
esl_set_string(profiles[pcount].host, "127.0.0.1");
esl_set_string(profiles[pcount].pass, "ClueCon");
profiles[pcount].port = 8021;
set_fn_keys(&profiles[pcount]);
@@ -1221,6 +1231,8 @@ static void read_config(const char *dft_cfile, const char *cfile) {
}
} else if(!strcasecmp(var, "loglevel")) {
esl_set_string(profiles[pcount-1].loglevel, val);
} else if(!strcasecmp(var, "log-uuid")) {
profiles[pcount-1].log_uuid = esl_true(val);
} else if(!strcasecmp(var, "quiet")) {
profiles[pcount-1].quiet = esl_true(val);
} else if(!strcasecmp(var, "prompt-color")) {
@@ -1282,6 +1294,7 @@ int main(int argc, char *argv[])
{"debug", 1, 0, 'd'},
{"execute", 1, 0, 'x'},
{"loglevel", 1, 0, 'l'},
{"log-uuid", 0, 0, 'U'},
{"quiet", 0, 0, 'q'},
{"batchmode", 0, 0, 'b'},
{"retry", 0, 0, 'r'},
@@ -1303,6 +1316,7 @@ int main(int argc, char *argv[])
int argv_exec = 0;
char argv_command[1024] = "";
char argv_loglevel[128] = "";
int argv_log_uuid = 0;
int argv_quiet = 0;
int argv_batch = 0;
int loops = 2, reconnect = 0, timeout = 0;
@@ -1340,7 +1354,7 @@ int main(int argc, char *argv[])
esl_global_set_default_logger(6); /* default debug level to 6 (info) */
for(;;) {
int option_index = 0;
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:t:qrRhib?n", options, &option_index);
opt = getopt_long(argc, argv, "H:P:S:u:p:d:x:l:Ut:qrRhib?n", options, &option_index);
if (opt == -1) break;
switch (opt) {
case 'H':
@@ -1383,6 +1397,9 @@ int main(int argc, char *argv[])
case 'l':
esl_set_string(argv_loglevel, optarg);
break;
case 'U':
argv_log_uuid = 1;
break;
case 'q':
argv_quiet = 1;
break;
@@ -1445,6 +1462,9 @@ int main(int argc, char *argv[])
esl_set_string(profile->loglevel, argv_loglevel);
profile->quiet = 0;
}
if (argv_log_uuid) {
profile->log_uuid = 1;
}
esl_log(ESL_LOG_DEBUG, "Using profile %s [%s]\n", profile->name, profile->host);
esl_set_string(prompt_color, profile->prompt_color);
esl_set_string(input_text_color, profile->input_text_color);
+66 -3
View File
@@ -634,7 +634,70 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1nextHeader(J
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3, jstring jarg4) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2, jstring jarg3, jstring jarg4) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
ESLconnection *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = 0;
if (jarg1) {
arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
if (!arg1) return 0;
}
arg2 = (int)jarg2;
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
arg4 = 0;
if (jarg4) {
arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
if (!arg4) return 0;
}
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
*(ESLconnection **)&jresult = result;
if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
return jresult;
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2, jstring jarg3) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
ESLconnection *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = 0;
if (jarg1) {
arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
if (!arg1) return 0;
}
arg2 = (int)jarg2;
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
*(ESLconnection **)&jresult = result;
if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3, jstring jarg4) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -674,7 +737,7 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SW
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -707,7 +770,7 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SW
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jint jarg1) {
jlong jresult = 0 ;
int arg1 ;
ESLconnection *result = 0 ;
@@ -33,16 +33,24 @@ public class ESLconnection {
swigCPtr = 0;
}
public ESLconnection(String host, String port, String user, String password) {
public ESLconnection(String host, int port, String user, String password) {
this(eslJNI.new_ESLconnection__SWIG_0(host, port, user, password), true);
}
public ESLconnection(String host, String port, String password) {
public ESLconnection(String host, int port, String password) {
this(eslJNI.new_ESLconnection__SWIG_1(host, port, password), true);
}
public ESLconnection(String host, String port, String user, String password) {
this(eslJNI.new_ESLconnection__SWIG_2(host, port, user, password), true);
}
public ESLconnection(String host, String port, String password) {
this(eslJNI.new_ESLconnection__SWIG_3(host, port, password), true);
}
public ESLconnection(int socket) {
this(eslJNI.new_ESLconnection__SWIG_2(socket), true);
this(eslJNI.new_ESLconnection__SWIG_4(socket), true);
}
public int socketDescriptor() {
+5 -3
View File
@@ -31,9 +31,11 @@ class eslJNI {
public final static native boolean ESLevent_delHeader(long jarg1, ESLevent jarg1_, String jarg2);
public final static native String ESLevent_firstHeader(long jarg1, ESLevent jarg1_);
public final static native String ESLevent_nextHeader(long jarg1, ESLevent jarg1_);
public final static native long new_ESLconnection__SWIG_0(String jarg1, String jarg2, String jarg3, String jarg4);
public final static native long new_ESLconnection__SWIG_1(String jarg1, String jarg2, String jarg3);
public final static native long new_ESLconnection__SWIG_2(int jarg1);
public final static native long new_ESLconnection__SWIG_0(String jarg1, int jarg2, String jarg3, String jarg4);
public final static native long new_ESLconnection__SWIG_1(String jarg1, int jarg2, String jarg3);
public final static native long new_ESLconnection__SWIG_2(String jarg1, String jarg2, String jarg3, String jarg4);
public final static native long new_ESLconnection__SWIG_3(String jarg1, String jarg2, String jarg3);
public final static native long new_ESLconnection__SWIG_4(int jarg1);
public final static native void delete_ESLconnection(long jarg1);
public final static native int ESLconnection_socketDescriptor(long jarg1, ESLconnection jarg1_);
public final static native int ESLconnection_connected(long jarg1, ESLconnection jarg1_);
+105 -5
View File
@@ -2231,6 +2231,63 @@ static const char *swig_ESLevent_base_names[] = {0};
static swig_lua_class _wrap_class_ESLevent = { "ESLevent", &SWIGTYPE_p_ESLevent,_wrap_new_ESLevent, swig_delete_ESLevent, swig_ESLevent_methods, swig_ESLevent_attributes, swig_ESLevent_bases, swig_ESLevent_base_names };
static int _wrap_new_ESLconnection__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
ESLconnection *result = 0 ;
SWIG_check_num_args("ESLconnection",4,4)
if(!lua_isstring(L,1)) SWIG_fail_arg("ESLconnection",1,"char const *");
if(!lua_isnumber(L,2)) SWIG_fail_arg("ESLconnection",2,"int const");
if(!lua_isstring(L,3)) SWIG_fail_arg("ESLconnection",3,"char const *");
if(!lua_isstring(L,4)) SWIG_fail_arg("ESLconnection",4,"char const *");
arg1 = (char *)lua_tostring(L, 1);
arg2 = (int const)lua_tonumber(L, 2);
arg3 = (char *)lua_tostring(L, 3);
arg4 = (char *)lua_tostring(L, 4);
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
fail:
lua_error(L);
return SWIG_arg;
}
static int _wrap_new_ESLconnection__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
ESLconnection *result = 0 ;
SWIG_check_num_args("ESLconnection",3,3)
if(!lua_isstring(L,1)) SWIG_fail_arg("ESLconnection",1,"char const *");
if(!lua_isnumber(L,2)) SWIG_fail_arg("ESLconnection",2,"int const");
if(!lua_isstring(L,3)) SWIG_fail_arg("ESLconnection",3,"char const *");
arg1 = (char *)lua_tostring(L, 1);
arg2 = (int const)lua_tonumber(L, 2);
arg3 = (char *)lua_tostring(L, 3);
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
fail:
lua_error(L);
return SWIG_arg;
}
static int _wrap_new_ESLconnection__SWIG_2(lua_State* L) {
int SWIG_arg = -1;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -2260,7 +2317,7 @@ fail:
}
static int _wrap_new_ESLconnection__SWIG_1(lua_State* L) {
static int _wrap_new_ESLconnection__SWIG_3(lua_State* L) {
int SWIG_arg = -1;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -2287,7 +2344,7 @@ fail:
}
static int _wrap_new_ESLconnection__SWIG_2(lua_State* L) {
static int _wrap_new_ESLconnection__SWIG_4(lua_State* L) {
int SWIG_arg = -1;
int arg1 ;
ESLconnection *result = 0 ;
@@ -2321,7 +2378,26 @@ static int _wrap_new_ESLconnection(lua_State* L) {
_v = lua_isnumber(L,argv[0]);
}
if (_v) {
return _wrap_new_ESLconnection__SWIG_2(L);
return _wrap_new_ESLconnection__SWIG_4(L);
}
}
if (argc == 3) {
int _v;
{
_v = lua_isstring(L,argv[0]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[1]);
}
if (_v) {
{
_v = lua_isstring(L,argv[2]);
}
if (_v) {
return _wrap_new_ESLconnection__SWIG_1(L);
}
}
}
}
if (argc == 3) {
@@ -2338,7 +2414,31 @@ static int _wrap_new_ESLconnection(lua_State* L) {
_v = lua_isstring(L,argv[2]);
}
if (_v) {
return _wrap_new_ESLconnection__SWIG_1(L);
return _wrap_new_ESLconnection__SWIG_3(L);
}
}
}
}
if (argc == 4) {
int _v;
{
_v = lua_isstring(L,argv[0]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[1]);
}
if (_v) {
{
_v = lua_isstring(L,argv[2]);
}
if (_v) {
{
_v = lua_isstring(L,argv[3]);
}
if (_v) {
return _wrap_new_ESLconnection__SWIG_0(L);
}
}
}
}
@@ -2361,7 +2461,7 @@ static int _wrap_new_ESLconnection(lua_State* L) {
_v = lua_isstring(L,argv[3]);
}
if (_v) {
return _wrap_new_ESLconnection__SWIG_0(L);
return _wrap_new_ESLconnection__SWIG_2(L);
}
}
}
+9 -3
View File
@@ -251,13 +251,19 @@ class ESLPINVOKE {
public static extern string ESLevent_NextHeader(HandleRef jarg1);
[DllImport("ESL", EntryPoint="CSharp_new_ESLconnection__SWIG_0")]
public static extern IntPtr new_ESLconnection__SWIG_0(string jarg1, string jarg2, string jarg3, string jarg4);
public static extern IntPtr new_ESLconnection__SWIG_0(string jarg1, int jarg2, string jarg3, string jarg4);
[DllImport("ESL", EntryPoint="CSharp_new_ESLconnection__SWIG_1")]
public static extern IntPtr new_ESLconnection__SWIG_1(string jarg1, string jarg2, string jarg3);
public static extern IntPtr new_ESLconnection__SWIG_1(string jarg1, int jarg2, string jarg3);
[DllImport("ESL", EntryPoint="CSharp_new_ESLconnection__SWIG_2")]
public static extern IntPtr new_ESLconnection__SWIG_2(int jarg1);
public static extern IntPtr new_ESLconnection__SWIG_2(string jarg1, string jarg2, string jarg3, string jarg4);
[DllImport("ESL", EntryPoint="CSharp_new_ESLconnection__SWIG_3")]
public static extern IntPtr new_ESLconnection__SWIG_3(string jarg1, string jarg2, string jarg3);
[DllImport("ESL", EntryPoint="CSharp_new_ESLconnection__SWIG_4")]
public static extern IntPtr new_ESLconnection__SWIG_4(int jarg1);
[DllImport("ESL", EntryPoint="CSharp_delete_ESLconnection")]
public static extern void delete_ESLconnection(HandleRef jarg1);
+9 -3
View File
@@ -38,13 +38,19 @@ public class ESLconnection : IDisposable {
}
}
public ESLconnection(string host, string port, string user, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_0(host, port, user, password), true) {
public ESLconnection(string host, int port, string user, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_0(host, port, user, password), true) {
}
public ESLconnection(string host, string port, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_1(host, port, password), true) {
public ESLconnection(string host, int port, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_1(host, port, password), true) {
}
public ESLconnection(int socket) : this(ESLPINVOKE.new_ESLconnection__SWIG_2(socket), true) {
public ESLconnection(string host, string port, string user, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_2(host, port, user, password), true) {
}
public ESLconnection(string host, string port, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_3(host, port, password), true) {
}
public ESLconnection(int socket) : this(ESLPINVOKE.new_ESLconnection__SWIG_4(socket), true) {
}
public int SocketDescriptor() {
+37 -3
View File
@@ -576,7 +576,41 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_NextHeader(void * jarg1) {
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_0(char * jarg1, char * jarg2, char * jarg3, char * jarg4) {
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_0(char * jarg1, int jarg2, char * jarg3, char * jarg4) {
void * jresult ;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
ESLconnection *result = 0 ;
arg1 = (char *)jarg1;
arg2 = (int)jarg2;
arg3 = (char *)jarg3;
arg4 = (char *)jarg4;
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_1(char * jarg1, int jarg2, char * jarg3) {
void * jresult ;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
ESLconnection *result = 0 ;
arg1 = (char *)jarg1;
arg2 = (int)jarg2;
arg3 = (char *)jarg3;
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_2(char * jarg1, char * jarg2, char * jarg3, char * jarg4) {
void * jresult ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -594,7 +628,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_0(char * jarg1, cha
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_1(char * jarg1, char * jarg2, char * jarg3) {
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_3(char * jarg1, char * jarg2, char * jarg3) {
void * jresult ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -610,7 +644,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_1(char * jarg1, cha
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_2(int jarg1) {
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_4(int jarg1) {
void * jresult ;
int arg1 ;
ESLconnection *result = 0 ;
+213 -14
View File
@@ -2673,6 +2673,117 @@ XS(_wrap_ESLevent_nextHeader) {
XS(_wrap_new_ESLconnection__SWIG_0) {
{
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
ESLconnection *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int res4 ;
char *buf4 = 0 ;
int alloc4 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 4) || (items > 4)) {
SWIG_croak("Usage: new_ESLconnection(host,port,user,password);");
}
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
if (!SWIG_IsOK(res4)) {
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ESLconnection" "', argument " "4"" of type '" "char const *""'");
}
arg4 = reinterpret_cast< char * >(buf4);
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
XSRETURN(argvi);
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
SWIG_croak_null();
}
}
XS(_wrap_new_ESLconnection__SWIG_1) {
{
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
ESLconnection *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 3) || (items > 3)) {
SWIG_croak("Usage: new_ESLconnection(host,port,password);");
}
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
XSRETURN(argvi);
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_croak_null();
}
}
XS(_wrap_new_ESLconnection__SWIG_2) {
{
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -2734,7 +2845,7 @@ XS(_wrap_new_ESLconnection__SWIG_0) {
}
XS(_wrap_new_ESLconnection__SWIG_1) {
XS(_wrap_new_ESLconnection__SWIG_3) {
{
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -2785,7 +2896,7 @@ XS(_wrap_new_ESLconnection__SWIG_1) {
}
XS(_wrap_new_ESLconnection__SWIG_2) {
XS(_wrap_new_ESLconnection__SWIG_4) {
{
int arg1 ;
ESLconnection *result = 0 ;
@@ -2855,8 +2966,10 @@ XS(_wrap_new_ESLconnection) {
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
_v = SWIG_CheckState(res);
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
@@ -2877,7 +2990,7 @@ XS(_wrap_new_ESLconnection) {
}
check_2:
if (items == 4) {
if (items == 3) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
@@ -2906,14 +3019,6 @@ XS(_wrap_new_ESLconnection) {
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_3;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 3;
if (_rank == _rankm) goto dispatch;
@@ -2921,14 +3026,108 @@ XS(_wrap_new_ESLconnection) {
}
check_3:
if (items == 4) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_4;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_4;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_4;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_4;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 4;
if (_rank == _rankm) goto dispatch;
}
}
check_4:
if (items == 4) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_5;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_5;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_5;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_5;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 5;
if (_rank == _rankm) goto dispatch;
}
}
check_5:
dispatch:
switch(_index) {
case 1:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_2); return;
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_4); return;
case 2:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_1); return;
case 3:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_3); return;
case 4:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_0); return;
case 5:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_2); return;
}
}
+121 -5
View File
@@ -1796,6 +1796,93 @@ fail:
ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_0) {
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
ESLconnection *result = 0 ;
zval **args[4];
SWIG_ResetError();
if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
WRONG_PARAM_COUNT;
}
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[0]);
arg1 = (char *) Z_STRVAL_PP(args[0]);
/*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
convert_to_long_ex(args[1]);
arg2 = (int) Z_LVAL_PP(args[1]);
/*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[3]);
arg4 = (char *) Z_STRVAL_PP(args[3]);
/*@SWIG@*/;
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
{
SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLconnection, 1);
}
return;
fail:
zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
}
ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_1) {
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
ESLconnection *result = 0 ;
zval **args[3];
SWIG_ResetError();
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
WRONG_PARAM_COUNT;
}
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[0]);
arg1 = (char *) Z_STRVAL_PP(args[0]);
/*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
convert_to_long_ex(args[1]);
arg2 = (int) Z_LVAL_PP(args[1]);
/*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
{
SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLconnection, 1);
}
return;
fail:
zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
}
ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_2) {
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
@@ -1842,7 +1929,7 @@ fail:
}
ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_1) {
ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_3) {
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
@@ -1882,7 +1969,7 @@ fail:
}
ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_2) {
ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_4) {
int arg1 ;
ESLconnection *result = 0 ;
zval **args[1];
@@ -1918,7 +2005,20 @@ ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection) {
int _v;
_v = (Z_TYPE_PP(argv[0]) == IS_LONG);
if (_v) {
return _wrap_new_ESLconnection__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU);
return _wrap_new_ESLconnection__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
}
if (argc == 3) {
int _v;
_v = (Z_TYPE_PP(argv[0]) == IS_STRING);
if (_v) {
_v = (Z_TYPE_PP(argv[1]) == IS_LONG);
if (_v) {
_v = (Z_TYPE_PP(argv[2]) == IS_STRING);
if (_v) {
return _wrap_new_ESLconnection__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
}
}
}
if (argc == 3) {
@@ -1929,7 +2029,23 @@ ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection) {
if (_v) {
_v = (Z_TYPE_PP(argv[2]) == IS_STRING);
if (_v) {
return _wrap_new_ESLconnection__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
return _wrap_new_ESLconnection__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
}
}
}
if (argc == 4) {
int _v;
_v = (Z_TYPE_PP(argv[0]) == IS_STRING);
if (_v) {
_v = (Z_TYPE_PP(argv[1]) == IS_LONG);
if (_v) {
_v = (Z_TYPE_PP(argv[2]) == IS_STRING);
if (_v) {
_v = (Z_TYPE_PP(argv[3]) == IS_STRING);
if (_v) {
return _wrap_new_ESLconnection__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
}
}
}
@@ -1944,7 +2060,7 @@ ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection) {
if (_v) {
_v = (Z_TYPE_PP(argv[3]) == IS_STRING);
if (_v) {
return _wrap_new_ESLconnection__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
return _wrap_new_ESLconnection__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
}
}
+167 -5
View File
@@ -3786,6 +3786,124 @@ SWIGINTERN PyObject *ESLevent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObj
}
SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
ESLconnection *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int res4 ;
char *buf4 = 0 ;
int alloc4 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ESLconnection",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
if (!SWIG_IsOK(res4)) {
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ESLconnection" "', argument " "4"" of type '" "char const *""'");
}
arg4 = reinterpret_cast< char * >(buf4);
{
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
SWIG_PYTHON_THREAD_END_ALLOW;
}
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 );
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
SWIG_PYTHON_THREAD_END_BLOCK;
return resultobj;
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
SWIG_PYTHON_THREAD_END_BLOCK;
return NULL;
}
SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
ESLconnection *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
if (!PyArg_ParseTuple(args,(char *)"OOO:new_ESLconnection",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
{
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
SWIG_PYTHON_THREAD_END_ALLOW;
}
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 );
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_PYTHON_THREAD_END_BLOCK;
return resultobj;
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_PYTHON_THREAD_END_BLOCK;
return NULL;
}
SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3853,7 +3971,7 @@ fail:
}
SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3909,7 +4027,7 @@ fail:
}
SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
int arg1 ;
ESLconnection *result = 0 ;
@@ -3957,7 +4075,26 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) {
}
if (_v) {
SWIG_PYTHON_THREAD_END_BLOCK;
return _wrap_new_ESLconnection__SWIG_2(self, args);
return _wrap_new_ESLconnection__SWIG_4(self, args);
}
}
if (argc == 3) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
SWIG_PYTHON_THREAD_END_BLOCK;
return _wrap_new_ESLconnection__SWIG_1(self, args);
}
}
}
}
if (argc == 3) {
@@ -3972,7 +4109,30 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) {
_v = SWIG_CheckState(res);
if (_v) {
SWIG_PYTHON_THREAD_END_BLOCK;
return _wrap_new_ESLconnection__SWIG_1(self, args);
return _wrap_new_ESLconnection__SWIG_3(self, args);
}
}
}
}
if (argc == 4) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
SWIG_PYTHON_THREAD_END_BLOCK;
return _wrap_new_ESLconnection__SWIG_0(self, args);
}
}
}
}
@@ -3992,7 +4152,7 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) {
_v = SWIG_CheckState(res);
if (_v) {
SWIG_PYTHON_THREAD_END_BLOCK;
return _wrap_new_ESLconnection__SWIG_0(self, args);
return _wrap_new_ESLconnection__SWIG_2(self, args);
}
}
}
@@ -4003,6 +4163,8 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) {
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ESLconnection'.\n"
" Possible C/C++ prototypes are:\n"
" ESLconnection(char const *,int const,char const *,char const *)\n"
" ESLconnection(char const *,int const,char const *)\n"
" ESLconnection(char const *,char const *,char const *,char const *)\n"
" ESLconnection(char const *,char const *,char const *)\n"
" ESLconnection(int)\n");
+148 -5
View File
@@ -2745,6 +2745,107 @@ swig_class cESLconnection;
SWIGINTERN VALUE
_wrap_new_ESLconnection__SWIG_0(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
ESLconnection *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int res4 ;
char *buf4 = 0 ;
int alloc4 = 0 ;
if ((argc < 4) || (argc > 4)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
}
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","ESLconnection", 1, argv[0] ));
}
arg1 = reinterpret_cast< char * >(buf1);
ecode2 = SWIG_AsVal_int(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ESLconnection", 2, argv[1] ));
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","ESLconnection", 3, argv[2] ));
}
arg3 = reinterpret_cast< char * >(buf3);
res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
if (!SWIG_IsOK(res4)) {
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","ESLconnection", 4, argv[3] ));
}
arg4 = reinterpret_cast< char * >(buf4);
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);DATA_PTR(self) = result;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
return self;
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
return Qnil;
}
SWIGINTERN VALUE
_wrap_new_ESLconnection__SWIG_1(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
ESLconnection *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
if ((argc < 3) || (argc > 3)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
}
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","ESLconnection", 1, argv[0] ));
}
arg1 = reinterpret_cast< char * >(buf1);
ecode2 = SWIG_AsVal_int(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","ESLconnection", 2, argv[1] ));
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","ESLconnection", 3, argv[2] ));
}
arg3 = reinterpret_cast< char * >(buf3);
result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);DATA_PTR(self) = result;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return self;
fail:
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return Qnil;
}
SWIGINTERN VALUE
_wrap_new_ESLconnection__SWIG_2(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
@@ -2803,7 +2904,7 @@ fail:
SWIGINTERN VALUE
_wrap_new_ESLconnection__SWIG_1(int argc, VALUE *argv, VALUE self) {
_wrap_new_ESLconnection__SWIG_3(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
@@ -2868,7 +2969,7 @@ _wrap_ESLconnection_allocate(VALUE self) {
SWIGINTERN VALUE
_wrap_new_ESLconnection__SWIG_2(int argc, VALUE *argv, VALUE self) {
_wrap_new_ESLconnection__SWIG_4(int argc, VALUE *argv, VALUE self) {
int arg1 ;
ESLconnection *result = 0 ;
int val1 ;
@@ -2907,7 +3008,25 @@ SWIGINTERN VALUE _wrap_new_ESLconnection(int nargs, VALUE *args, VALUE self) {
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_ESLconnection__SWIG_2(nargs, args, self);
return _wrap_new_ESLconnection__SWIG_4(nargs, args, self);
}
}
if (argc == 3) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_ESLconnection__SWIG_1(nargs, args, self);
}
}
}
}
if (argc == 3) {
@@ -2921,7 +3040,29 @@ SWIGINTERN VALUE _wrap_new_ESLconnection(int nargs, VALUE *args, VALUE self) {
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_ESLconnection__SWIG_1(nargs, args, self);
return _wrap_new_ESLconnection__SWIG_3(nargs, args, self);
}
}
}
}
if (argc == 4) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_ESLconnection__SWIG_0(nargs, args, self);
}
}
}
}
@@ -2940,7 +3081,7 @@ SWIGINTERN VALUE _wrap_new_ESLconnection(int nargs, VALUE *args, VALUE self) {
int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_ESLconnection__SWIG_0(nargs, args, self);
return _wrap_new_ESLconnection__SWIG_2(nargs, args, self);
}
}
}
@@ -2949,6 +3090,8 @@ SWIGINTERN VALUE _wrap_new_ESLconnection(int nargs, VALUE *args, VALUE self) {
fail:
Ruby_Format_OverloadedError( argc, 4, "ESLconnection.new",
" ESLconnection.new(char const *host, int const port, char const *user, char const *password)\n"
" ESLconnection.new(char const *host, int const port, char const *password)\n"
" ESLconnection.new(char const *host, char const *port, char const *user, char const *password)\n"
" ESLconnection.new(char const *host, char const *port, char const *password)\n"
" ESLconnection.new(int socket)\n");
+14
View File
@@ -9,6 +9,20 @@ void eslSetLogLevel(int level)
esl_global_set_default_logger(level);
}
ESLconnection::ESLconnection(const char *host, const int port, const char *password)
{
connection_construct_common();
esl_connect(&handle, host, port, NULL, password);
}
ESLconnection::ESLconnection(const char *host, const int port, const char *user, const char *password)
{
connection_construct_common();
esl_connect(&handle, host, port, user, password);
}
ESLconnection::ESLconnection(const char *host, const char *port, const char *password)
{
connection_construct_common();
+2
View File
@@ -74,6 +74,8 @@ class ESLconnection {
private:
esl_handle_t handle;
public:
ESLconnection(const char *host, const int port, const char *user, const char *password);
ESLconnection(const char *host, const int port, const char *password);
ESLconnection(const char *host, const char *port, const char *user, const char *password);
ESLconnection(const char *host, const char *port, const char *password);
ESLconnection(int socket);
+3
View File
@@ -26,6 +26,9 @@ testr2
testsangomaboost
testtones
!/msvc/testanalog/
!/msvc/testboost/
!/sample/boost/Makefile
!/sample/dso/Makefile
+6 -2
View File
@@ -382,9 +382,12 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
break;
case 'L':
if (!LOOPING) {
ts->LOOPS = atoi(cur + 2);
int L;
if ((L = atoi(cur + 2)) > 0) {
ts->LOOPS = L;
LOOPING++;
}
}
LOOPING++;
break;
}
} else {
@@ -480,6 +483,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
bottom:
free(data);
data = NULL;
if (ts->LOOPS > 0) {
ts->LOOPS--;
}
+1 -1
View File
@@ -1 +1 @@
Tue May 14 07:44:21 CDT 2013
Mon Jul 15 16:57:11 CDT 2013
+1
View File
@@ -226,6 +226,7 @@ void iks_disconnect (iksparser *prs);
int iks_has_tls (void);
int iks_is_secure (iksparser *prs);
int iks_start_tls (iksparser *prs);
int iks_proceed_tls (iksparser *prs, const char *cert_file, const char *key_file, int use_ssl);
int iks_start_sasl (iksparser *prs, enum ikssasltype type, char *username, char *pass);
/***** jabber *****/
+69 -5
View File
@@ -35,6 +35,8 @@ typedef unsigned __int32 uint32_t;
#define SF_FOREIGN 1
#define SF_TRY_SECURE 2
#define SF_SECURE 4
#define SF_SERVER 8
#define SF_SSLv23 16
struct stream_data {
iksparser *prs;
@@ -51,6 +53,8 @@ struct stream_data {
unsigned int flags;
char *auth_username;
char *auth_pass;
char *cert_file;
char *key_file;
#ifdef HAVE_GNUTLS
gnutls_session sess;
gnutls_certificate_credentials cred;
@@ -201,6 +205,7 @@ handshake (struct stream_data *data)
gnutls_certificate_free_credentials (data->cred);
return IKS_NOMEM;
}
gnutls_protocol_set_priority (data->sess, protocol_priority);
gnutls_cipher_set_priority(data->sess, cipher_priority);
gnutls_compression_set_priority(data->sess, comp_priority);
@@ -224,7 +229,9 @@ handshake (struct stream_data *data)
data->flags &= (~SF_TRY_SECURE);
data->flags |= SF_SECURE;
iks_send_header (data->prs, data->server);
if (!(data->flags & SF_SERVER)) {
iks_send_header (data->prs, data->server);
}
return IKS_OK;
} // HAVE_GNUTLS
@@ -311,8 +318,25 @@ handshake (struct stream_data *data)
SSL_library_init();
SSL_load_error_strings();
data->ssl_ctx = SSL_CTX_new(TLSv1_method());
if(!data->ssl_ctx) return IKS_NOMEM;
if (data->flags & SF_SERVER) {
if (data->flags & SF_SSLv23) {
data->ssl_ctx = SSL_CTX_new(SSLv23_server_method());
} else {
data->ssl_ctx = SSL_CTX_new(TLSv1_server_method());
}
if(!data->ssl_ctx) return IKS_NOMEM;
if (SSL_CTX_use_certificate_file(data->ssl_ctx, data->cert_file, SSL_FILETYPE_PEM) <= 0) {
return IKS_NET_TLSFAIL;
}
if (SSL_CTX_use_PrivateKey_file(data->ssl_ctx, data->key_file, SSL_FILETYPE_PEM) <= 0) {
return IKS_NET_TLSFAIL;
}
SSL_CTX_set_verify(data->ssl_ctx, SSL_VERIFY_NONE, NULL);
} else {
data->ssl_ctx = SSL_CTX_new(TLSv1_method());
if(!data->ssl_ctx) return IKS_NOMEM;
}
data->ssl = SSL_new(data->ssl_ctx);
if(!data->ssl) return IKS_NOMEM;
@@ -329,7 +353,11 @@ handshake (struct stream_data *data)
do
{
ret = SSL_connect(data->ssl);
if (data->flags & SF_SERVER) {
ret = SSL_accept(data->ssl);
} else {
ret = SSL_connect(data->ssl);
}
if( ret != 1 )
{
@@ -346,7 +374,9 @@ handshake (struct stream_data *data)
data->flags &= (~SF_TRY_SECURE);
data->flags |= SF_SECURE;
iks_send_header (data->prs, data->server);
if (!(data->flags & SF_SERVER)) {
iks_send_header (data->prs, data->server);
}
}
return ret == 1 ? IKS_OK : IKS_NET_TLSFAIL;
@@ -954,6 +984,40 @@ iks_start_tls (iksparser *prs)
#endif
}
int
iks_proceed_tls (iksparser *prs, const char *cert_file, const char *key_file, int use_ssl)
{
#ifdef HAVE_GNUTLS
int ret;
struct stream_data *data = iks_user_data (prs);
ret = iks_send_raw (prs, "<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
if (ret) return ret;
data->cert_file = iks_stack_strdup(data->s, cert_file, 0);
data->key_file = iks_stack_strdup(data->s, key_file, 0);
data->flags |= SF_TRY_SECURE | SF_SERVER;
if (use_ssl) {
data->flags |= SF_SSLv23;
}
return handshake (data);
#elif HAVE_SSL
int ret;
struct stream_data *data = iks_user_data (prs);
ret = iks_send_raw (prs, "<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
if (ret) return ret;
data->cert_file = iks_stack_strdup(data->s, cert_file, 0);
data->key_file = iks_stack_strdup(data->s, key_file, 0);
data->flags |= SF_TRY_SECURE | SF_SERVER;
if (use_ssl) {
data->flags |= SF_SSLv23;
}
return handshake (data);
#else
return IKS_NET_NOTSUPP;
#endif
}
/***** sasl *****/
int
+6 -2
View File
@@ -382,9 +382,12 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
break;
case 'L':
if (!LOOPING) {
ts->LOOPS = atoi(cur + 2);
int L;
if ((L = atoi(cur + 2)) > 0) {
ts->LOOPS = L;
LOOPING++;
}
}
LOOPING++;
break;
}
} else {
@@ -480,6 +483,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
bottom:
free(data);
data = NULL;
if (ts->LOOPS > 0) {
ts->LOOPS--;
}
+3
View File
@@ -22,3 +22,6 @@ testisdn
testpri
testr2
testtones
!/msvc/testanalog/
!/msvc/testisdn/
+1 -1
View File
@@ -1 +1 @@
Thu Jun 20 10:51:51 CDT 2013
Mon Jul 29 16:07:46 CDT 2013
+25 -20
View File
@@ -149,9 +149,7 @@ struct nta_agent_s
nta_update_magic_t *sa_update_magic;
nta_update_tport_f *sa_update_tport;
su_time_t sa_now; /**< Timestamp in microsecond resolution. */
uint32_t sa_next; /**< Timestamp for next agent_timer. */
uint32_t sa_millisec; /**< Timestamp in milliseconds. */
msg_mclass_t const *sa_mclass;
uint32_t sa_flags; /**< SIP message flags */
@@ -1237,15 +1235,12 @@ void agent_timer(su_root_magic_t *rm, su_timer_t *timer, nta_agent_t *agent)
agent->sa_next = 0;
agent->sa_now = stamp;
agent->sa_millisec = now;
agent->sa_in_timer = 1;
_nta_outgoing_timer(agent);
_nta_incoming_timer(agent);
/* agent->sa_now is used only if sa_millisec != 0 */
agent->sa_millisec = 0;
agent->sa_in_timer = 0;
/* Calculate next timeout */
@@ -1330,12 +1325,12 @@ uint32_t set_timeout(nta_agent_t *agent, uint32_t offset)
if (offset == 0)
return 0;
if (agent->sa_millisec) /* Avoid expensive call to su_now() */
now = agent->sa_now, ms = agent->sa_millisec;
else
now = su_now(), ms = su_time_ms(now);
now = su_now();
ms = su_time_ms(now);
next = ms + offset; if (next == 0) next = 1;
next = ms + offset;
if (next == 0) next = 1;
if (agent->sa_in_timer) /* Currently executing timer */
return next;
@@ -1360,9 +1355,6 @@ uint32_t set_timeout(nta_agent_t *agent, uint32_t offset)
static
su_time_t agent_now(nta_agent_t const *agent)
{
if (agent && agent->sa_millisec != 0)
return agent->sa_now;
else
return su_now();
}
@@ -2764,8 +2756,6 @@ void agent_recv_message(nta_agent_t *agent,
{
sip_t *sip = sip_object(msg);
agent->sa_millisec = su_time_ms(agent->sa_now = now);
if (sip && sip->sip_request) {
agent_recv_request(agent, msg, sip, tport);
}
@@ -2775,8 +2765,6 @@ void agent_recv_message(nta_agent_t *agent,
else {
agent_recv_garbage(agent, msg, tport);
}
agent->sa_millisec = 0;
}
/** @internal Handle incoming requests. */
@@ -6849,7 +6837,7 @@ enum {
static void
_nta_incoming_timer(nta_agent_t *sa)
{
uint32_t now = sa->sa_millisec;
uint32_t now = su_time_ms(su_now());
nta_incoming_t *irq, *irq_next;
size_t retransmitted = 0, timeout = 0, terminated = 0, destroyed = 0;
size_t unconfirmed =
@@ -6866,6 +6854,9 @@ _nta_incoming_timer(nta_agent_t *sa)
/* Handle retry queue */
while ((irq = sa->sa_in.re_list)) {
now = su_time_ms(su_now());
if ((int32_t)(irq->irq_retry - now) > 0)
break;
if (retransmitted >= timer_max_retransmit)
@@ -6923,6 +6914,8 @@ _nta_incoming_timer(nta_agent_t *sa)
}
while ((irq = sa->sa_in.final_failed->q_head)) {
incoming_remove(irq);
irq->irq_final_failed = 0;
@@ -6954,6 +6947,8 @@ _nta_incoming_timer(nta_agent_t *sa)
assert(irq->irq_status < 200);
assert(irq->irq_timeout);
now = su_time_ms(su_now());
if ((int32_t)(irq->irq_timeout - now) > 0)
break;
if (timeout >= timer_max_timeout)
@@ -6974,6 +6969,8 @@ _nta_incoming_timer(nta_agent_t *sa)
assert(irq->irq_timeout);
assert(irq->irq_method == sip_method_invite);
now = su_time_ms(su_now());
if ((int32_t)(irq->irq_timeout - now) > 0 ||
timeout >= timer_max_timeout ||
terminated >= timer_max_terminate)
@@ -7002,6 +6999,8 @@ _nta_incoming_timer(nta_agent_t *sa)
assert(irq->irq_status >= 200);
assert(irq->irq_method == sip_method_invite);
now = su_time_ms(su_now());
if ((int32_t)(irq->irq_timeout - now) > 0 ||
terminated >= timer_max_terminate)
break;
@@ -7024,6 +7023,8 @@ _nta_incoming_timer(nta_agent_t *sa)
assert(irq->irq_timeout);
assert(irq->irq_method != sip_method_invite);
now = su_time_ms(su_now());
if ((int32_t)(irq->irq_timeout - now) > 0 ||
terminated >= timer_max_terminate)
break;
@@ -7043,6 +7044,7 @@ _nta_incoming_timer(nta_agent_t *sa)
}
for (irq = sa->sa_in.terminated->q_head; irq; irq = irq_next) {
irq_next = irq->irq_next;
if (irq->irq_destroyed)
incoming_free_queue(rq, irq);
@@ -8699,7 +8701,7 @@ void outgoing_destroy(nta_outgoing_t *orq)
static void
_nta_outgoing_timer(nta_agent_t *sa)
{
uint32_t now = sa->sa_millisec;
uint32_t now = su_time_ms(su_now());
nta_outgoing_t *orq;
outgoing_queue_t rq[1];
size_t retransmitted = 0, terminated = 0, timeout = 0, destroyed;
@@ -8713,6 +8715,9 @@ _nta_outgoing_timer(nta_agent_t *sa)
outgoing_queue_init(sa->sa_out.free = rq, 0);
while ((orq = sa->sa_out.re_list)) {
now = su_time_ms(su_now());
if ((int32_t)(orq->orq_retry - now) > 0)
break;
if (retransmitted >= timer_max_retransmit)
@@ -1062,11 +1062,15 @@ int nua_client_response(nua_client_request_t *cr,
sip_method_t method = cr->cr_method;
int terminated, graceful = 1;
if (status < 700)
terminated = sip_response_terminates_dialog(status, method, &graceful);
else
/* XXX - terminate usage by all internal error responses */
terminated = 0, graceful = 1;
if (status < 700) {
terminated = sip_response_terminates_dialog(status, method, &graceful);
if (terminated && !cr->cr_initial) {
terminated = 0, graceful = 1;
}
} else {
/* XXX - terminate usage by all internal error responses */
terminated = 0, graceful = 1;
}
if (terminated < 0)
cr->cr_terminated = terminated;
@@ -85,6 +85,11 @@ typedef uint64_t su_nanotime_t;
#define SU_E9 (1000000000U)
typedef void (*su_time_func_t)(su_time_t *tv);
SOFIAPUBFUN void su_set_time_func(su_time_func_t func);
SOFIAPUBFUN su_nanotime_t su_nanotime(su_nanotime_t *return_time);
SOFIAPUBFUN su_nanotime_t su_monotime(su_nanotime_t *return_time);
@@ -138,7 +143,7 @@ su_inline uint32_t su_ntp_fraq(su_time_t t)
/** Time as milliseconds. */
su_inline uint32_t su_time_ms(su_time_t t)
{
return t.tv_sec * 1000 + (t.tv_usec + 500) / 1000;
return (t.tv_sec * 1000) + ((t.tv_usec + 500) / 1000);
}
#endif
+20 -4
View File
@@ -69,6 +69,13 @@
void (*_su_time)(su_time_t *tv);
uint64_t (*_su_nanotime)(uint64_t *);
static su_time_func_t custom_time_func = NULL;
void su_set_time_func(su_time_func_t func) {
custom_time_func = func;
}
/** Get current time.
*
* The function @c su_time() fills its argument with the current NTP
@@ -78,7 +85,20 @@ uint64_t (*_su_nanotime)(uint64_t *);
*/
void su_time(su_time_t *tv)
{
#if HAVE_FILETIME
union {
FILETIME ft[1];
ULARGE_INTEGER ull[1];
} date;
#endif
su_time_t ltv = {0,0};
if (custom_time_func) {
custom_time_func(&ltv);
if (tv) *tv = ltv;
return;
}
#if HAVE_CLOCK_GETTIME
struct timespec ctv = {0};
if (clock_gettime(CLOCK_REALTIME, &ctv) == 0) {
@@ -91,10 +111,6 @@ void su_time(su_time_t *tv)
ltv.tv_sec += NTP_EPOCH;
#elif HAVE_FILETIME
union {
FILETIME ft[1];
ULARGE_INTEGER ull[1];
} date;
GetSystemTimeAsFileTime(date.ft);
File diff suppressed because it is too large Load Diff
+3
View File
@@ -427,6 +427,9 @@
<Project>{dee932ab-5911-4700-9eeb-8c7090a0a330}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="msvc\make_cielab_luts.2010.vcxproj">
<Project>{85f0cf8c-c7ab-48f6-ba19-cc94cf87f981}</Project>
</ProjectReference>
<ProjectReference Include="msvc\make_math_fixed_tables.2010.vcxproj">
<Project>{9d04a840-ce18-4ff5-a6d3-0a2bb92ff2e6}</Project>
</ProjectReference>
+3
View File
@@ -431,6 +431,9 @@
<Project>{dee932ab-5911-4700-9eeb-8c7090a0a330}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="msvc\make_cielab_luts.2012.vcxproj">
<Project>{85f0cf8c-c7ab-48f6-ba19-cc94cf87f981}</Project>
</ProjectReference>
<ProjectReference Include="msvc\make_math_fixed_tables.2012.vcxproj">
<Project>{2386b892-35f5-46cf-a0f0-10394d2fbf9b}</Project>
</ProjectReference>
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="All|Win32">
<Configuration>All</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>make_cielab_luts</ProjectName>
<ProjectGuid>{85F0CF8C-C7AB-48F6-BA19-CC94CF87F981}</ProjectGuid>
<RootNamespace>make_cielab_luts</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\make_cielab_luts\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='All|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'">
<BuildLog>
<Path>$(IntDir)BuildLog $(ProjectName).htm</Path>
</BuildLog>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.;.\spandsp;.\msvc;..\..\tiff-4.0.2\libtiff;.\generated;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>"$(TargetPath)" &gt;"$(ProjectDir)..\cielab_luts.h"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\make_cielab_luts.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="All|Win32">
<Configuration>All</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>make_cielab_luts</ProjectName>
<ProjectGuid>{85F0CF8C-C7AB-48F6-BA19-CC94CF87F981}</ProjectGuid>
<RootNamespace>make_cielab_luts</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\make_cielab_luts\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='All|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'">
<BuildLog>
<Path>$(IntDir)BuildLog $(ProjectName).htm</Path>
</BuildLog>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.;.\spandsp;.\msvc;..\..\tiff-4.0.2\libtiff;.\generated;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>"$(TargetPath)" &gt;"$(ProjectDir)..\cielab_luts.h"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\make_cielab_luts.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -27,7 +27,7 @@
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\make_at_dictionary\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\make_math_fixed_tables\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='All|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'">
@@ -28,7 +28,7 @@
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\make_at_dictionary\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\make_math_fixed_tables\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='All|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'">
+2 -2
View File
@@ -112,7 +112,7 @@ xcopy "$(ProjectDir)..\..\apr\include\*.h" "$(ProjectDir)..\..\include\" /C /D /
<AdditionalOptions>/EHsc %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\apr\include;..\..\apr\include/arch;..\..\apr\include/arch/win32;..\..\apr\include/arch/unix;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;APR_DECLARE_EXPORT;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;APR_DECLARE_EXPORT;APR_VOID_P_IS_QUAD;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
@@ -181,7 +181,7 @@ xcopy "$(ProjectDir)..\..\apr\include\*.h" "$(ProjectDir)..\..\include\" /C /D /
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\apr\include;..\..\apr\include/arch;..\..\apr\include/arch/win32;..\..\apr\include/arch/unix;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;APR_DECLARE_EXPORT;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;APR_DECLARE_EXPORT;APR_VOID_P_IS_QUAD;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
+2 -2
View File
@@ -116,7 +116,7 @@ xcopy "$(ProjectDir)..\..\apr\include\*.h" "$(ProjectDir)..\..\include\" /C /D /
<AdditionalOptions>/EHsc %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\apr\include;..\..\apr\include/arch;..\..\apr\include/arch/win32;..\..\apr\include/arch/unix;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;APR_DECLARE_EXPORT;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;APR_DECLARE_EXPORT;APR_VOID_P_IS_QUAD;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
@@ -185,7 +185,7 @@ xcopy "$(ProjectDir)..\..\apr\include\*.h" "$(ProjectDir)..\..\include\" /C /D /
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\apr\include;..\..\apr\include/arch;..\..\apr\include/arch/win32;..\..\apr\include/arch/unix;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;APR_DECLARE_EXPORT;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;APR_DECLARE_EXPORT;APR_VOID_P_IS_QUAD;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>