Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 71726 Details for
Bug 115006
Java Agent is not processing command line arguments comparable to C++ agent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
ac patch
patch_115006_ac.txt (text/plain), 2.84 KB, created by
Igor Alelekov
on 2007-06-19 08:24:07 EDT
(
hide
)
Description:
ac patch
Filename:
MIME Type:
Creator:
Igor Alelekov
Created:
2007-06-19 08:24:07 EDT
Size:
2.84 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.platform.agentcontroller >Index: src-native-new/src/javaBaseAgent/BaseAgentJNI.cpp >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.agentcontroller/src-native-new/src/javaBaseAgent/BaseAgentJNI.cpp,v >retrieving revision 1.8 >diff -u -r1.8 BaseAgentJNI.cpp >--- src-native-new/src/javaBaseAgent/BaseAgentJNI.cpp 6 Jun 2006 01:29:00 -0000 1.8 >+++ src-native-new/src/javaBaseAgent/BaseAgentJNI.cpp 19 Jun 2007 07:15:39 -0000 >@@ -122,11 +122,6 @@ > */ > JNIEXPORT jint JNICALL Java_org_eclipse_tptp_platform_execution_datacollection_BaseAgent_register0(JNIEnv *env, jobject thisObj, jstring name) > { >- char *cargv = "X"; >- //No command line args hence the env to be picked up. >- //TODO: Need to pass command line args to the Java agent from the command line. >- baseAgentImpl->processCommandLine(0, &cargv); >- > jint returnValue = -1; > /* Convert the Unicode Strings into UTF-8 ones */ > const char *asciiName = env->GetStringUTFChars(name,NULL); >@@ -932,3 +927,37 @@ > { > return processCmdCallBkWCtxt(cmd, DEFAULT_PROVIDER); > } >+ >+/* >+ * Class: org_eclipse_tptp_platform_execution_datacollection_BaseAgent >+ * Method: processCommandLine0 >+ * Signature: ([Ljava/lang/String;)V >+ */ >+JNIEXPORT void JNICALL Java_org_eclipse_tptp_platform_execution_datacollection_BaseAgent_processCommandLine0 >+ (JNIEnv *env, jobject obj, jobjectArray args) { >+ >+ int len = env->GetArrayLength(args); >+ if (len <= 0) return; >+ >+ char** argv = (char**) malloc(len*sizeof(char*)); >+ if (argv == NULL) return; >+ >+ for (int i=0; i<len; i++) { >+ jstring arg = (jstring) env->GetObjectArrayElement(args, i); >+ char* s = (char*) env->GetStringUTFChars(arg, 0); >+ >+ int slen = strlen(s); >+ argv[i] = (char*) malloc(slen+1); >+ if (argv[i] == NULL) return; >+ >+ strcpy (argv[i], s); >+ >+ env->ReleaseStringUTFChars(arg, s); >+ } >+ >+ baseAgentImpl->processCommandLine(len, argv); >+ >+ for (i=0; i<len; i++) free(argv[i]); >+ >+ free(argv); >+ } >Index: src-native-new/src/javaBaseAgent/BaseAgentJNI.h >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.agentcontroller/src-native-new/src/javaBaseAgent/BaseAgentJNI.h,v >retrieving revision 1.5 >diff -u -r1.5 BaseAgentJNI.h >--- src-native-new/src/javaBaseAgent/BaseAgentJNI.h 10 Feb 2006 18:32:12 -0000 1.5 >+++ src-native-new/src/javaBaseAgent/BaseAgentJNI.h 19 Jun 2007 07:15:39 -0000 >@@ -141,6 +141,9 @@ > int removeClientCallBk(int clientID); > //char* getServiceConfigFileCallBk(); > >+JNIEXPORT void JNICALL Java_org_eclipse_tptp_platform_execution_datacollection_BaseAgent_processCommandLine0 >+ (JNIEnv *, jobject, jobjectArray); >+ > #ifdef __cplusplus > } > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 115006
:
66917
| 71726 |
71727