Changeset 125:e643134d0f9c in mediastreamer2
- Timestamp:
- Oct 29, 2008 4:06:10 PM (5 years ago)
- Branch:
- default
- Location:
- p2pproxy
- Files:
-
- 11 added
- 2 edited
-
AUTHORS (added)
-
COPYING (added)
-
ChangeLog (added)
-
INSTALL (added)
-
Makefile.am (added)
-
NEWS (added)
-
README (added)
-
autogen.sh (added)
-
configure.ac (added)
-
launcher/Makefile.am (added)
-
launcher/src/Makefile.am (added)
-
launcher/src/p2pproxy.c (modified) (7 diffs)
-
launcher/src/p2pproxy.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
p2pproxy/launcher/src/p2pproxy.c
r82 r125 8 8 #endif 9 9 #ifndef P2PPROXY_INSTALLDIR 10 #define P2PPROXY_INSTALLDIR "/usr/ local/share/java"10 #define P2PPROXY_INSTALLDIR "/usr/share/java/fonis" 11 11 #endif 12 12 #ifndef P2PPROXY_BUILDDIR … … 14 14 #endif 15 15 #define NUMBER_OF_OPTION 7 16 JavaVM *p2pproxy_application_jvm = 0;16 JavaVM *p2pproxy_application_jvm = 0; 17 17 18 18 #define GET_JNI_ENV \ 19 19 jint lResult = 0 ;\ 20 JNIEnv *lJniEnv = 0;\20 JNIEnv *lJniEnv = 0;\ 21 21 jclass lMainClass = 0;\ 22 lResult = (*p2pproxy_application_jvm)->AttachCurrentThread(p2pproxy_application_jvm, &lJniEnv,NULL);\22 lResult = (*p2pproxy_application_jvm)->AttachCurrentThread(p2pproxy_application_jvm,(void**)&lJniEnv,NULL);\ 23 23 if (lResult != 0) { \ 24 24 fprintf(stderr,"cannot attach VM\n");\ … … 33 33 34 34 int p2pproxy_application_start(int argc, char **argv) { 35 JNIEnv *lJniEnv = 0;35 JNIEnv *lJniEnv = 0; 36 36 jclass lMainClass = 0; 37 38 37 JavaVMInitArgs args; 39 38 JavaVMOption options[NUMBER_OF_OPTION]; … … 70 69 args.nOptions = NUMBER_OF_OPTION; 71 70 args.options = options; 72 args.ignoreUnrecognized = JNI_FALSE; int lResult;71 args.ignoreUnrecognized = JNI_FALSE; 73 72 74 73 75 res = JNI_CreateJavaVM(&p2pproxy_application_jvm, (void **)&lJniEnv, &args);74 res = JNI_CreateJavaVM(&p2pproxy_application_jvm, (void**)& lJniEnv, &args); 76 75 if (res < 0) { 77 76 fprintf(stderr,"cannot start p2pproxy vm [%i]",res); 78 77 return P2PPROXY_ERROR; 79 78 } 80 81 79 lMainClass = (*lJniEnv)->FindClass(lJniEnv, "org/linphone/p2pproxy/core/P2pProxyMain"); 82 80 … … 144 142 jmethodID lLookupSipProxyUriMethod; 145 143 jstring lJStringResult; 146 const jbyte* lString;144 const char* lString; 147 145 jboolean lIsCopy; 148 146 jstring applicationArg; … … 185 183 186 184 } 187 void p2pproxy_application_stop() { 185 186 int p2pproxy_application_stop() { 188 187 jmethodID stopMethod = 0; 189 188 GET_JNI_ENV … … 192 191 (*lJniEnv)->CallStaticVoidMethod(lJniEnv, lMainClass, stopMethod); 193 192 (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm); 194 return; 195 193 return 0; 196 194 } 197 195 -
p2pproxy/launcher/src/p2pproxy.h
r81 r125 60 60 * 61 61 */ 62 int p2pproxy_application_get_state( );62 int p2pproxy_application_get_state(void); 63 63 64 64 /** … … 66 66 * 67 67 */ 68 void p2pproxy_application_stop();68 int p2pproxy_application_stop(void); 69 69 70 70 /**
Note: See TracChangeset
for help on using the changeset viewer.
