@@ -4803,7 +4803,7 @@ void writeSharedObject(const char *srcpath, const MemoryBuffer &obj, const char
48034803 throw MakeStringException (ECLWATCH_CANNOT_COPY_DLL, " Failed copying shared object %s" , srcpath);
48044804}
48054805
4806- void deploySharedObject (IEspContext &context, StringBuffer &wuid, const char *cluster, const char *name, const MemoryBuffer &obj, const char *dir, const char *xml, bool protect)
4806+ void deploySharedObject (IEspContext &context, StringBuffer &wuid, const char *cluster, const char *name, const MemoryBuffer &obj, const char *dir, const char *xml, bool protect, const char *sourceProcess, const char *sourceFilename )
48074807{
48084808 StringBuffer dllpath, dllname;
48094809
@@ -4833,9 +4833,18 @@ void deploySharedObject(IEspContext &context, StringBuffer &wuid, const char *cl
48334833 }
48344834 }
48354835
4836+ StringBuffer originalDllName (sourceFilename);
4837+ if (originalDllName.isEmpty () && !isEmptyString (name))
4838+ originalDllName.append (name).append (SharedObjectExtension);
4839+
48364840 NewWsWorkunit wu (context, wuid);
48374841 wuid.set (wu->queryWuid ()); // Update the wuid to the new unique value
48384842
4843+ if (!originalDllName.isEmpty ())
4844+ wu->setApplicationValue (" deploy" , " sourceQuery" , originalDllName.str (), true );
4845+ if (!isEmptyString (sourceProcess))
4846+ wu->setApplicationValue (" deploy" , " sourceEnvironment" , sourceProcess, true );
4847+
48394848 // Write the dll to a filename based on the unique wuid
48404849 StringBuffer baseDllName;
48414850 baseDllName.append (SharedObjectPrefix).append (wuid).append (SharedObjectExtension);
@@ -4888,7 +4897,7 @@ void CWsWorkunitsEx::deploySharedObjectReq(IEspContext &context, IEspWUDeployWor
48884897 }
48894898
48904899 StringBuffer wuid;
4891- deploySharedObject (context, wuid, cluster, req.getName (), *uncompressed, dir, xml, req.getProtect ());
4900+ deploySharedObject (context, wuid, cluster, req.getName (), *uncompressed, dir, xml, req.getProtect (), nullptr , req. getFileName () );
48924901
48934902 WsWuInfo winfo (context, wuid.str ());
48944903 winfo.getCommon (resp.updateWorkunit (), WUINFO_All);
0 commit comments