diff options
author | Christian Grothoff <christian@grothoff.org> | 2005-07-17 12:24:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2005-07-17 12:24:55 +0000 |
commit | afa6e3be1a63ed8d0224e650983748570650cd57 (patch) | |
tree | c1d9798ea0fb7d76ea8e513d99bd6928654deb4a | |
parent | ae7103eabdccba84c5f20c50aa1f92af91cfb028 (diff) | |
download | gnunet-gtk-afa6e3be1a63ed8d0224e650983748570650cd57.tar.gz gnunet-gtk-afa6e3be1a63ed8d0224e650983748570650cd57.zip |
assorted bugfixes
-rw-r--r-- | src/plugins/fs/collection.c | 2 | ||||
-rw-r--r-- | src/plugins/fs/helper.c | 4 | ||||
-rw-r--r-- | src/plugins/fs/helper.h | 2 | ||||
-rw-r--r-- | src/plugins/fs/namespace.c | 13 |
4 files changed, 10 insertions, 11 deletions
diff --git a/src/plugins/fs/collection.c b/src/plugins/fs/collection.c index 56dddd2e..81aa9791 100644 --- a/src/plugins/fs/collection.c +++ b/src/plugins/fs/collection.c | |||
@@ -53,7 +53,7 @@ void createCollection_clicked(GtkWidget * dummy1, | |||
53 | GtkWidget * spin; | 53 | GtkWidget * spin; |
54 | struct ECRS_MetaData * meta; | 54 | struct ECRS_MetaData * meta; |
55 | struct ECRS_URI * root; | 55 | struct ECRS_URI * root; |
56 | cron_t updateInterval; | 56 | TIME_T updateInterval; |
57 | 57 | ||
58 | metaXML | 58 | metaXML |
59 | = glade_xml_new(getGladeFileName(), | 59 | = glade_xml_new(getGladeFileName(), |
diff --git a/src/plugins/fs/helper.c b/src/plugins/fs/helper.c index f17f427b..70ff9e19 100644 --- a/src/plugins/fs/helper.c +++ b/src/plugins/fs/helper.c | |||
@@ -35,7 +35,7 @@ | |||
35 | * @return OK on success, SYSERR on error | 35 | * @return OK on success, SYSERR on error |
36 | */ | 36 | */ |
37 | int parseTime(const char * t, | 37 | int parseTime(const char * t, |
38 | cron_t * param) { | 38 | TIME_T * param) { |
39 | int pos; | 39 | int pos; |
40 | int start; | 40 | int start; |
41 | unsigned int val; | 41 | unsigned int val; |
@@ -88,7 +88,7 @@ int parseTime(const char * t, | |||
88 | while ( t[pos] == ' ') | 88 | while ( t[pos] == ' ') |
89 | pos++; | 89 | pos++; |
90 | } | 90 | } |
91 | *param = ret; | 91 | *param = ret / cronSECONDS; |
92 | return OK; | 92 | return OK; |
93 | } | 93 | } |
94 | 94 | ||
diff --git a/src/plugins/fs/helper.h b/src/plugins/fs/helper.h index 24186aa7..72938fc3 100644 --- a/src/plugins/fs/helper.h +++ b/src/plugins/fs/helper.h | |||
@@ -35,6 +35,6 @@ | |||
35 | * @return OK on success, SYSERR on error | 35 | * @return OK on success, SYSERR on error |
36 | */ | 36 | */ |
37 | int parseTime(const char * t, | 37 | int parseTime(const char * t, |
38 | cron_t * val); | 38 | TIME_T * val); |
39 | 39 | ||
40 | #endif | 40 | #endif |
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c index 8282ce13..468d9a86 100644 --- a/src/plugins/fs/namespace.c +++ b/src/plugins/fs/namespace.c | |||
@@ -251,8 +251,8 @@ static int addNamespaceContentToModel(void * cls, | |||
251 | const ECRS_FileInfo * fi, | 251 | const ECRS_FileInfo * fi, |
252 | const HashCode512 * lastId, | 252 | const HashCode512 * lastId, |
253 | const HashCode512 * nextId, | 253 | const HashCode512 * nextId, |
254 | cron_t publicationFrequency, | 254 | TIME_T publicationFrequency, |
255 | cron_t nextPublicationTime) { | 255 | TIME_T nextPublicationTime) { |
256 | GtkListStore * model = GTK_LIST_STORE(cls); | 256 | GtkListStore * model = GTK_LIST_STORE(cls); |
257 | GtkTreeIter iter; | 257 | GtkTreeIter iter; |
258 | char * filename; | 258 | char * filename; |
@@ -298,9 +298,9 @@ static int addNamespaceContentToModel(void * cls, | |||
298 | uriString = ECRS_uriToString(fi->uri); | 298 | uriString = ECRS_uriToString(fi->uri); |
299 | hash2enc(lastId, &last); | 299 | hash2enc(lastId, &last); |
300 | hash2enc(nextId, &next); | 300 | hash2enc(nextId, &next); |
301 | t = nextPublicationTime / cronSECONDS; | 301 | t = nextPublicationTime; |
302 | date = GN_CTIME(&t); | 302 | date = GN_CTIME(&t); |
303 | freq = timeIntervalToFancyString(publicationFrequency); | 303 | freq = timeIntervalToFancyString(publicationFrequency * cronSECONDS); |
304 | gtk_list_store_append(model, | 304 | gtk_list_store_append(model, |
305 | &iter); | 305 | &iter); |
306 | gtk_list_store_set(model, | 306 | gtk_list_store_set(model, |
@@ -554,7 +554,7 @@ void namespaceDelete_clicked(GtkWidget * dummy1, | |||
554 | typedef struct { | 554 | typedef struct { |
555 | unsigned int anonymityLevel; | 555 | unsigned int anonymityLevel; |
556 | char * namespaceName; | 556 | char * namespaceName; |
557 | cron_t updateInterval; | 557 | TIME_T updateInterval; |
558 | HashCode512 * lastId; | 558 | HashCode512 * lastId; |
559 | HashCode512 thisId; | 559 | HashCode512 thisId; |
560 | HashCode512 * nextId; | 560 | HashCode512 * nextId; |
@@ -619,8 +619,7 @@ static void initiateUpload(GtkTreeModel * model, | |||
619 | &cls->thisId, | 619 | &cls->thisId, |
620 | cls->nextId, | 620 | cls->nextId, |
621 | cls->updateInterval, | 621 | cls->updateInterval, |
622 | cls->updateInterval | 622 | cls->updateInterval + TIME(NULL)); |
623 | + cronTime(NULL) ); | ||
624 | } | 623 | } |
625 | ECRS_freeUri(resultURI); | 624 | ECRS_freeUri(resultURI); |
626 | } else { | 625 | } else { |