Skip to content
Snippets Groups Projects
Commit cf66e6d1 authored by Simon Rose's avatar Simon Rose
Browse files

Merge branch 'e3_610_set_stream_protocol_path' into 'master'

E3-610: Set STREAM_PROTOCOL_PATH

See merge request e3/e3-require!75
parents 01fb4662 79cf1a83
No related branches found
No related tags found
No related merge requests found
...@@ -352,6 +352,8 @@ char *realpathSeparator(const char *location) { ...@@ -352,6 +352,8 @@ char *realpathSeparator(const char *location) {
return buffer; return buffer;
} }
int isModuleLoaded(const char *libname);
static int setupDbPath(const char *module, const char *dbdir) { static int setupDbPath(const char *module, const char *dbdir) {
char *absdir = char *absdir =
realpathSeparator(dbdir); /* so we can change directory later safely */ realpathSeparator(dbdir); /* so we can change directory later safely */
...@@ -373,6 +375,9 @@ static int setupDbPath(const char *module, const char *dbdir) { ...@@ -373,6 +375,9 @@ static int setupDbPath(const char *module, const char *dbdir) {
putenvprintf("%s_DB=%s", module, absdir); putenvprintf("%s_DB=%s", module, absdir);
putenvprintf("TEMPLATES=%s", absdir); putenvprintf("TEMPLATES=%s", absdir);
if (isModuleLoaded("stream")) {
pathAdd("STREAM_PROTOCOL_PATH", absdir);
}
pathAdd("EPICS_DB_INCLUDE_PATH", absdir); pathAdd("EPICS_DB_INCLUDE_PATH", absdir);
free(absdir); free(absdir);
return 0; return 0;
...@@ -727,6 +732,16 @@ const char *getLibLocation(const char *libname) { ...@@ -727,6 +732,16 @@ const char *getLibLocation(const char *libname) {
return NULL; return NULL;
} }
int isModuleLoaded(const char *libname) {
moduleitem *m;
for (m = loadedModules; m; m = m->next) {
if (strcmp(m->content, libname) == 0)
return TRUE;
}
return FALSE;
}
int libversionShow(const char *outfile) { int libversionShow(const char *outfile) {
moduleitem *m; moduleitem *m;
size_t lm, lv; size_t lm, lv;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment