diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-03-19 22:55:07 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-03-19 22:55:07 +0000 |
commit | a281ac1f83742c4cdea53f5a9f60bca799a1768f (patch) | |
tree | b5b317e923387a31ead4009d756c47bd40316a08 | |
parent | be9f64c22db52d41b9be94737b40d320ad16e026 (diff) | |
download | cmogstored-a281ac1f83742c4cdea53f5a9f60bca799a1768f.tar.gz |
If there are filesystem errors, hopefully syslog goes to a different filesystem or even a different machine.
-rw-r--r-- | http_put.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -25,8 +25,11 @@ static void file_close_null(struct mog_http *http) { struct mog_file *file = &http->forward->as.file; - if (file->tmppath) - mog_unlink(http->svc, file->tmppath); + if (file->tmppath) { + if (mog_unlink(http->svc, file->tmppath) != 0) + syslog(LOG_ERR, "Failed to unlink %s (in %s): %m", + file->tmppath, http->svc->docroot); + } mog_file_close(http->forward); http->forward = NULL; } |