Project

General

Profile

Actions

Feature #248

open

Fixes and extensions for fork mode in storescp (3.5.4)

Added by Marco Eichelberg over 19 years ago. Updated almost 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Module:
dcmnet
Operating System:
Compiler:

Description

http://forum.dcmtk.org/viewtopic.php?t=678
Aktuelle Fassung unter: http://earchive.at/dcmtk-3.5.4/

after some more modifications to storescp.cc (from dcmtk-3.5.4),
the --eostudy-timeout and the different --exec-on-... Options work with --fork, too.

Additionally I implemented two new features: * a new Parameter #r to pass the "remote_host" of an Association to the different --exec-on Scripts, -> done * a new --exec-on-sostudy (-xss) Switch, to execute a Script after receiving the first Object of a NEW Study

WARNING! this modified version will compile ONLY on linux, cause i have no time / environment to check this with Windows.

You can find my modified storescp.cc here: ( /export/share/dicom/contrib/20060519_gerhardh_storescp )
all modifications are marked with:

// HG: ...

UPDATE 2006-06-16 by "Luuk":

It was not to hard to adjust Gerhard's code to make it work under Windows (just
use findfirst/findnext/findclose instead of opendir / closedir)

But then another issue arises. Using the next commandline is OK:
storescp --fork -xcr dosomething.bat 1000
To give the batch-file some parameters you can add for example #f and/or #p as follows
storescp --fork -xcr "dosomething.bat #p #f" 1000

The quotation marks are needed, else you'll get the error message "Too many
parameters". The problem is that for the child process the quotation marks are
lost. This results in the same error message if you start to send a DICOM-file.
So I changed dul.cxx a little. I "replaced" lines 1651 and 1652 with the
following: Code:

 cmdLine += " \"";
 cmdLine += command_argv[i];
 cmdLine += "\"";

Now all parameters have quotation marks (but this is no problem, at least under Windows).

No data to display

Actions

Also available in: Atom PDF