Changeset 125:e643134d0f9c in mediastreamer2


Ignore:
Timestamp:
Oct 29, 2008 4:06:10 PM (5 years ago)
Author:
smorlat <smorlat@…>
Branch:
default
Message:
  • autoconf build system,
  • cleanups in C code

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@128 3f6dc0c8-ddfe-455d-9043-3cd528dc4637

Location:
p2pproxy
Files:
11 added
2 edited

Legend:

Unmodified
Added
Removed
  • p2pproxy/launcher/src/p2pproxy.c

    r82 r125  
    88#endif 
    99#ifndef P2PPROXY_INSTALLDIR 
    10         #define P2PPROXY_INSTALLDIR "/usr/local/share/java" 
     10        #define P2PPROXY_INSTALLDIR "/usr/share/java/fonis" 
    1111#endif  
    1212#ifndef P2PPROXY_BUILDDIR 
     
    1414#endif 
    1515#define NUMBER_OF_OPTION 7 
    16 JavaVM* p2pproxy_application_jvm = 0; 
     16JavaVM *p2pproxy_application_jvm = 0; 
    1717 
    1818#define GET_JNI_ENV \ 
    1919        jint lResult = 0 ;\ 
    20         JNIEnv* lJniEnv = 0;\ 
     20        JNIEnv *lJniEnv = 0;\ 
    2121        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);\ 
    2323        if (lResult != 0) { \ 
    2424                fprintf(stderr,"cannot attach VM\n");\ 
     
    3333 
    3434int p2pproxy_application_start(int argc, char **argv) { 
    35         JNIEnv* lJniEnv = 0; 
     35        JNIEnv *lJniEnv = 0; 
    3636        jclass  lMainClass = 0; 
    37          
    3837        JavaVMInitArgs args; 
    3938        JavaVMOption options[NUMBER_OF_OPTION]; 
     
    7069        args.nOptions = NUMBER_OF_OPTION; 
    7170        args.options = options; 
    72         args.ignoreUnrecognized = JNI_FALSE;    int lResult; 
     71        args.ignoreUnrecognized = JNI_FALSE; 
    7372         
    7473 
    75         res = JNI_CreateJavaVM(&p2pproxy_application_jvm, (void **)&lJniEnv, &args); 
     74        res = JNI_CreateJavaVM(&p2pproxy_application_jvm,  (void**)& lJniEnv, &args); 
    7675        if (res < 0) { 
    7776                fprintf(stderr,"cannot start p2pproxy vm [%i]",res); 
    7877                return P2PPROXY_ERROR; 
    7978        } 
    80  
    8179        lMainClass = (*lJniEnv)->FindClass(lJniEnv, "org/linphone/p2pproxy/core/P2pProxyMain"); 
    8280 
     
    144142        jmethodID lLookupSipProxyUriMethod; 
    145143        jstring lJStringResult;  
    146         const jbyte* lString; 
     144        const char* lString; 
    147145        jboolean  lIsCopy; 
    148146        jstring applicationArg; 
     
    185183         
    186184} 
    187 void p2pproxy_application_stop() { 
     185 
     186int p2pproxy_application_stop() { 
    188187        jmethodID stopMethod = 0; 
    189188        GET_JNI_ENV 
     
    192191        (*lJniEnv)->CallStaticVoidMethod(lJniEnv, lMainClass, stopMethod); 
    193192        (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm); 
    194         return; 
    195  
     193        return 0; 
    196194} 
    197195 
  • p2pproxy/launcher/src/p2pproxy.h

    r81 r125  
    6060 *  
    6161 */ 
    62 int p2pproxy_application_get_state(); 
     62int p2pproxy_application_get_state(void); 
    6363 
    6464/** 
     
    6666 *  
    6767 */ 
    68 void p2pproxy_application_stop(); 
     68int p2pproxy_application_stop(void); 
    6969 
    7070/** 
Note: See TracChangeset for help on using the changeset viewer.