Skip to content

Commit

Permalink
- Fix for corbaSessionName not being NULL as it is supposed to
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8391 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 29, 2011
1 parent 7476b8e commit a7a9423
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Compiler/runtime/RTOpts_omc.cpp
Expand Up @@ -36,8 +36,6 @@ extern "C" {
#include "rtoptsimpl.c"

extern int showErrorMessages;
extern const char* corbaSessionName;


extern int RTOpts_debugFlag(const char* flag) {
return check_debug_flag(flag)!=0;
Expand Down
9 changes: 7 additions & 2 deletions Compiler/runtime/rtoptsimpl.c
Expand Up @@ -98,8 +98,9 @@ int evaluateParametersInAnnotations = 0;
* @date 2007-02-08
* This variable is defined in corbaimpl.cpp and set
* here by function setCorbaSessionName(char* name);
* Note: This has to be NULL in order to work properly
*/
const char* corbaSessionName = "";
char* corbaSessionName = 0;

/*
* adrpo 2008-11-28
Expand Down Expand Up @@ -368,7 +369,11 @@ int setCorbaSessionName(const char *name)
if (len==0) return -1;
if (0 == strcmp("mdt",name)) /* There is no MDT release that enables MetaModelica grammar */
RTOpts_acceptedGrammar = GRAMMAR_METAMODELICA;
corbaSessionName = strdup(name);
if (corbaSessionName) free(corbaSessionName);
if (*name)
corbaSessionName = strdup(name);
else
corbaSessionName = NULL;
return 0;
}

Expand Down

0 comments on commit a7a9423

Please sign in to comment.