summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLassi Marttala <lassi.lm.marttala@partner.bmw.com>2012-03-14 13:12:28 +0100
committerChristian Muck <christian.muck@bmw.de>2012-04-04 14:28:45 +0200
commitd7ddd0ff6684c5b22d1405cd6e3b85b339c4db6a (patch)
treeff816b8aee895d5d2b5d83de6c6a0c5c4bd9ae38 /src/lib
parentd1973737681ef555010fa6047175c49638a53b00 (diff)
downloadDLT-daemon-d7ddd0ff6684c5b22d1405cd6e3b85b339c4db6a.tar.gz
GDLT-2: Change to gzip wrapper format. Change file signature creation to
account for file size, as inode number maybe duplicate when deleting and creating new files. Signed-off-by: Christian Muck <christian.muck@bmw.de>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dlt_filetransfer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/dlt_filetransfer.c b/src/lib/dlt_filetransfer.c
index 359ad2c..f8294c3 100644
--- a/src/lib/dlt_filetransfer.c
+++ b/src/lib/dlt_filetransfer.c
@@ -84,8 +84,12 @@ unsigned long getFilesize(const char* file){
*/
unsigned long getFileSerialNumber(const char* file){
struct stat st;
+ unsigned long ret;
stat(file, &st);
- return (unsigned long)st.st_ino;
+ ret = st.st_ino;
+ ret = ret << (sizeof(ret)*8)/2;
+ ret |= st.st_size;
+ return ret;
}
//!Returns the creation date of a file