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 100498 Details for
Bug 229189
Random intermitten errors while launching a test against remote agents
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]
Patch for intermittent errors
bug-229189.patch (text/plain), 3.65 KB, created by
Jonathan West
on 2008-05-15 13:42:26 EDT
(
hide
)
Description:
Patch for intermittent errors
Filename:
MIME Type:
Creator:
Jonathan West
Created:
2008-05-15 13:42:26 EDT
Size:
3.65 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.platform.agentcontroller >Index: src-native-new/src/shared/processControlUtil/ProcessControlUtil.c >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.agentcontroller/src-native-new/src/shared/processControlUtil/ProcessControlUtil.c,v >retrieving revision 1.49 >diff -u -r1.49 ProcessControlUtil.c >--- src-native-new/src/shared/processControlUtil/ProcessControlUtil.c 23 Apr 2008 17:07:13 -0000 1.49 >+++ src-native-new/src/shared/processControlUtil/ProcessControlUtil.c 15 May 2008 17:38:50 -0000 >@@ -762,7 +762,7 @@ > char *substring(const char *str, int start, int end) { > char * dest; > >- dest = malloc((end-start+10) * sizeof(char)); >+ dest = tptp_malloc((end-start+10) * sizeof(char)); > > strncpy(dest, str + start, end - start); > >@@ -812,6 +812,32 @@ > > } > >+/** Is the string (str) in the given classpath (classpath), with the classpath beginning at the first character, and >+ ending at the given length*/ >+int isStringInClasspathRange(const char *classpath, const char *str, int length) { >+ char * tempVal; >+ int result = 0; >+ >+ tempVal = (char *)tptp_malloc(sizeof(char) * length + 10); >+ >+ memcpy(tempVal, classpath, sizeof(char) * length); >+ >+ tempVal[length] = 0; >+ >+ result = isStringInClasspath(tempVal, str); >+ >+ tptp_free(tempVal); >+ >+ return result; >+} >+ >+ > > /** Returns 1 if the envValue is already in the environment variable under envName, or 0 otherwise. */ > int existsInEnv(char *envStart, int currentEnd, char *envName, char *envValue) { >@@ -843,16 +869,16 @@ > // If the value we are looking for is found in the environment variable... > if(isStringInClasspath(afterEquals, envValue)) { > >- free(beforeEquals); >- free(afterEquals); >+ tptp_free(beforeEquals); >+ tptp_free(afterEquals); > return 1; > > } > > } > >- free(beforeEquals); >- free(afterEquals); >+ tptp_free(beforeEquals); >+ tptp_free(afterEquals); > > // Advance past the null terminator in the environment variable string > x += strlen(env)+1; >@@ -970,7 +996,7 @@ > currentLength=keyLength+1+valueLength; > } > // If the variable is an APPEND, and the value being appended isn't already present in the environment variable... >- else if(varNode->position==APPEND && !isStringInClasspath(&parent[parentOffset], varNode->value) && !isStringInClasspath(&childEnv[childOffset], varNode->value)) { >+ else if(varNode->position==APPEND && !isStringInClasspath(&parent[parentOffset], varNode->value) && !isStringInClasspathRange(&childEnv[childOffset], varNode->value, currentLength)) { > /* Ensure the buffer is large enough to add the data */ > if((childOffset+currentLength+1+valueLength) >= bufferSize) { > int neededSize=((childOffset+currentLength+1+valueLength)-bufferSize)+1; >@@ -987,7 +1013,7 @@ > currentLength+=valueLength+1; > } > // If the variable is a PREPEND, and the value being prepended isn't already present in the environment variable... >- else if(varNode->position==PREPEND && !isStringInClasspath(&parent[parentOffset], varNode->value) && !isStringInClasspath(&childEnv[childOffset], varNode->value)) { >+ else if(varNode->position==PREPEND && !isStringInClasspath(&parent[parentOffset], varNode->value) && !isStringInClasspathRange(&childEnv[childOffset], varNode->value, currentLength)) { > char *temp; > if((childOffset+keyLength+1+valueLength+1+(currentLength-keyLength-1)) >= bufferSize) { > int neededSize=((childOffset+keyLength+1+valueLength+1+(currentLength-keyLength-1))-bufferSize)+1;
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 229189
:
98687
| 100498