Commit 7912d93e authored by jehan's avatar jehan

add native test ++

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@78 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 5d71fbcf
......@@ -5,15 +5,18 @@
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../src/launcher-tester.c \
../src/p2pproxy.c
../src/p2pproxy.c \
../src/p2pproxy_wrap.c
OBJS += \
./src/launcher-tester.o \
./src/p2pproxy.o
./src/p2pproxy.o \
./src/p2pproxy_wrap.o
C_DEPS += \
./src/launcher-tester.d \
./src/p2pproxy.d
./src/p2pproxy.d \
./src/p2pproxy_wrap.d
# Each subdirectory must supply rules for building sources it contributes
......
......@@ -3,7 +3,8 @@
#include <unistd.h>
static void * thread_starter(void *args){
p2pproxy_application_start( 0, 0);
char* largs[] = {"-seeding-server","-sip", "5058"};
p2pproxy_application_start(3,largs);
return NULL;
}
......@@ -12,8 +13,8 @@ int main(int argc, char **argv) {
pthread_t th;
printf("starting p2pproxy tester");
pthread_create(&th,NULL,thread_starter,NULL);
p2pproxy_application_start( 0, 0);
sleep(10);
sleep(1000);
/*p2pproxy_application_stop();*/
pthread_join(th,NULL);
return 0;
......
......@@ -71,7 +71,7 @@ int p2pproxy_application_start(int argc, char **argv) {
applicationArgsList = (*p2pproxy_application_jnienv)->NewObjectArray(p2pproxy_application_jnienv, argc, (*p2pproxy_application_jnienv)->FindClass(p2pproxy_application_jnienv, "java/lang/String"), NULL);
for (i=0;i<argc;i++) {
applicationArg = (*p2pproxy_application_jnienv)->NewStringUTF(p2pproxy_application_jnienv, *argv++);
applicationArg = (*p2pproxy_application_jnienv)->NewStringUTF(p2pproxy_application_jnienv, argv[i]);
(*p2pproxy_application_jnienv)->SetObjectArrayElement(p2pproxy_application_jnienv, applicationArgsList, 0, applicationArg);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment