Skip to content

Commit

Permalink
un-VERBOSE output
Browse files Browse the repository at this point in the history
Feel free to revert
  • Loading branch information
CGDogan committed Sep 18, 2023
1 parent 9ace36a commit f3985fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/Sources/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,8 @@ static void LookupDeletedFiles()
{
const std::string& path = it->first;
const std::string& instanceId = it->second;
__builtin_printf("executedelete path %s", path.c_str());
if (database_.RemoveFile(path))
{
__builtin_printf("executedelete rest\n");

OrthancPlugins::RestApiDelete("/instances/" + instanceId, false);
}
Expand Down Expand Up @@ -309,7 +307,6 @@ static OrthancPluginErrorCode StorageCreate(const char *uuid,
// Register it in the database, linking it to the file we encountered,
// and don't write it to the disk since that would be a duplicate.

__builtin_printf("StorageCreate br1 %s\n", uuid);
}
else
{
Expand All @@ -322,7 +319,7 @@ static OrthancPluginErrorCode StorageCreate(const char *uuid,
// unlike the original plugin, the branch for files found through scanning
// will run even for files we saved after receiving.

__builtin_fprintf(stderr, "Check race condition: entered branch\n");
// __builtin_fprintf(stderr, "Check race condition: entered branch\n");

boost::filesystem::path dicom = realStoragePath;
std::string subdir_name = folder_name((const char *) content, size);
Expand Down Expand Up @@ -369,14 +366,13 @@ static OrthancPluginErrorCode StorageCreate(const char *uuid,
write_time,
size,
instanceId);
__builtin_fprintf(stderr, "Check race condition: changed branch\n");
// __builtin_fprintf(stderr, "Check race condition: changed branch\n");

// Pretend to have received it now from processing from Orthanc
database_.AddAttachment(uuid, instanceId);
// Notify caMicroscope of the newly received DICOM file
camic_notifier::notify("/fs/addedFile?filepath=" + camic_notifier::escape(dicom.lexically_relative(realStoragePath).string()));

__builtin_printf("StorageCreate br2 %s\n", uuid);
}

return OrthancPluginErrorCode_Success;
Expand Down Expand Up @@ -472,7 +468,6 @@ static OrthancPluginErrorCode StorageRemove(const char *uuid,
std::string externalPath;
if (LookupExternalDicom(externalPath, uuid, type))
{
__builtin_printf("StorageRemove br1 %s\n", uuid);
database_.RemoveAttachment(uuid);

// Deleting from Orthanc UI/API should really delete the file or just make it invisible
Expand Down Expand Up @@ -503,7 +498,6 @@ static OrthancPluginErrorCode StorageRemove(const char *uuid,
}
else
{
__builtin_printf("StorageRemove br2 %s\n", uuid);

database_.RemoveAttachment(uuid);
storageArea_->RemoveAttachment(uuid);
Expand Down
2 changes: 1 addition & 1 deletion src/Sources/camic_interact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ std::string camic_notifier::origin;

// Change to 1 for debugging
#ifndef CURL_VERBOSE
#define CURL_VERBOSE 1
#define CURL_VERBOSE 0
#endif

// For connection verification: Counts the number of bytes read.
Expand Down

0 comments on commit f3985fa

Please sign in to comment.