forked from mirrors/linphone-iphone
add native test ++
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@78 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
5d71fbcf56
commit
7912d93ee6
3 changed files with 11 additions and 7 deletions
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue