~ubuntu-branches/ubuntu/trusty/ginkgocadx/trusty

« back to all changes in this revision

Viewing changes to src/cadxcore/main/controllers/dcmtk/dicommoveassociation.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-07-21 11:58:53 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: package-import@ubuntu.com-20130721115853-44e7n1xujqglu78e
Tags: 3.4.0.928.29+dfsg-1
* New upstream release [July 2013]
  + new B-D: "libjsoncpp-dev".
  + new patch "unbundle-libjsoncpp.patch" to avoid building bundled
    "libjsoncpp-dev".
  + new patch "fix-wx.patch" to avoid FTBFS due to missing
    "-lwx_gtk2u_html-2.8".
* Removed unnecessary versioned Build-Depends.
* Removed obsolete lintian override.
* Reference get-orig-source implementation for orig.tar clean-up and
  DFSG-repackaging.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
MoveAssociation::MoveAssociation(const std::string& _ambitolog, IModeloDicom* pModelo) : FindAssociation(_ambitolog),
47
47
                m_maxReceivePDULength(ASC_DEFAULTMAXPDU),
48
 
                m_pHandler(NULL),
49
48
                m_pModelo(pModelo),
50
49
                m_errorMessage("")
51
50
{
82
81
        DcmDataset* statusDetail = NULL;
83
82
 
84
83
        if (pdset == NULL) {
85
 
                LOG_ERROR(ambitolog, "Dataset nulo en moveSCU");
86
 
                return DIMSE_NULLKEY;
 
84
                return makeOFCondition(OFM_dcmnet, DIMSEC_BADDATA, OF_error, "NULL DIMSE Query");
87
85
        }
88
86
 
89
87
        //sopClass = m_abstractSyntaxMove;
96
94
                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
97
95
        }
98
96
 
99
 
 
100
97
        req.MessageID = msgId;
101
98
        strcpy(req.AffectedSOPClassUID, sopClass);
102
99
        req.Priority = DIMSE_PRIORITY_HIGH;
117
114
                this,
118
115
                &rsp, &statusDetail, &rspIds);
119
116
 
 
117
        if( rsp.DimseStatus != STATUS_Success && rsp.DimseStatus != STATUS_Pending) {
 
118
                std::ostringstream os;
 
119
                os << DU_cmoveStatusString(rsp.DimseStatus);
 
120
                if (statusDetail != NULL) {
 
121
                        OFString errorComment;
 
122
                        if (statusDetail->findAndGetOFString(DCM_ErrorComment, errorComment).good()) {
 
123
                                os << ". " << errorComment.c_str();
 
124
                        }
 
125
                }       
 
126
                m_errorMessage = os.str();
 
127
        }
 
128
 
120
129
        if (statusDetail != NULL) {
121
130
                LOG_DEBUG(ambitolog, "DIMSE_moveUser(): Estado: " << std::endl << DumpDataset(statusDetail));
122
131
                delete statusDetail;
136
145
        return cond;
137
146
}
138
147
 
139
 
void MoveAssociation::SetCallbackHandler(IStoreCallBack * handler) {
140
 
        m_pHandler = handler;
141
 
}