_DC_copyFile() no longer preserves errno, adjust all callers

git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@1941 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
gombasg 2008-10-31 13:43:57 +00:00 committed by Adam Visegradi
parent 7072a982f5
commit 543fc55e60
6 changed files with 16 additions and 16 deletions

View File

@ -684,6 +684,8 @@ int DC_addWUInput(DC_Workunit *wu, const char *logicalFileName, const char *URL,
ret = _DC_copyFile(URL, file->path);
if (ret)
{
DC_log(LOG_ERR, "Failed to copy the input file %s to %s",
URL, file->path);
_DC_destroyPhysicalFile(file);
return ret;
}

View File

@ -481,8 +481,8 @@ DC_addWUInput(DC_Workunit *wu,
ret= _DC_copyFile(URL, file->path);
if (ret)
{
DC_log(LOG_ERR, "Failed to link %s to %s: %s",
URL, file->path, strerror(errno));
DC_log(LOG_ERR, "Failed to copy %s to %s",
URL, file->path);
_DC_destroyPhysicalFile(file);
return(DC_ERR_BADPARAM); /* XXX */
}

View File

@ -190,7 +190,7 @@ int DC_sendResult(const char *logicalFileName,
if ((ret= _DC_copyFile(path, fn)) != DC_OK)
{
DC_log(LOG_ERR, "Failed to copy subresult file %s to "
"%s: %s", path, fn, strerror(errno));
"%s", path, fn);
free(fn);
return(ret);
}

View File

@ -220,12 +220,11 @@ _DC_create_message(char *box,
if (message)
fprintf(f, "%s", message);
else if (msgfile)
{
if ((ret= _DC_copyFile(msgfile, fn)) != 0)
DC_log(LOG_ERR, "copyFile(%s,%s) "
"error: %s", msgfile, fn,
strerror(errno));
}
{
if (_DC_copyFile(msgfile, fn))
DC_log(LOG_ERR, "copyFile(%s,%s) error",
msgfile, fn);
}
else
{
DC_log(LOG_WARNING, "No message specified for "

View File

@ -196,7 +196,7 @@ int DC_sendResult(const char *logicalFileName, const char *path, DC_FileMode fil
if ((ret= _DC_copyFile(path, fn)) != DC_OK)
{
DC_log(LOG_ERR, "Failed to copy subresult file %s to "
"%s: %s", path, fn, strerror(errno));
"%s", path, fn);
free(fn);
return(ret);
}

View File

@ -224,12 +224,11 @@ _DC_create_message(char *box,
if (message)
fprintf(f, "%s", message);
else if (msgfile)
{
if ((ret= _DC_copyFile(msgfile, fn)) != 0)
DC_log(LOG_ERR, "copyFile(%s,%s) "
"error: %s", msgfile, fn,
strerror(errno));
}
{
if (_DC_copyFile(msgfile, fn))
DC_log(LOG_ERR, "copyFile(%s,%s) error",
msgfile, fn);
}
else
{
DC_log(LOG_WARNING, "No message specified for "