diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-29 10:19:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-29 10:19:43 +0000 |
commit | cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb (patch) | |
tree | b704e00a3af618b2cd174a7f89514eaebd82a1cf /src/datastore | |
parent | bb4fc4f4007988874f910d4de5492f9629301641 (diff) | |
download | gnunet-cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb.tar.gz gnunet-cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb.zip |
run indent twice, it alternates between two 'canonical' forms, also run whitespace remover
Diffstat (limited to 'src/datastore')
-rw-r--r-- | src/datastore/datastore.h | 2 | ||||
-rw-r--r-- | src/datastore/datastore_api.c | 20 | ||||
-rw-r--r-- | src/datastore/gnunet-service-datastore.c | 6 | ||||
-rw-r--r-- | src/datastore/perf_plugin_datastore.c | 2 | ||||
-rw-r--r-- | src/datastore/plugin_datastore_mysql.c | 6 | ||||
-rw-r--r-- | src/datastore/plugin_datastore_postgres.c | 6 | ||||
-rw-r--r-- | src/datastore/plugin_datastore_sqlite.c | 12 | ||||
-rw-r--r-- | src/datastore/plugin_datastore_template.c | 4 | ||||
-rw-r--r-- | src/datastore/test_plugin_datastore.c | 2 |
9 files changed, 30 insertions, 30 deletions
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h index 39a680e42..1dcf7bb4b 100644 --- a/src/datastore/datastore.h +++ b/src/datastore/datastore.h | |||
@@ -103,7 +103,7 @@ struct GetMessage | |||
103 | { | 103 | { |
104 | /** | 104 | /** |
105 | * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size | 105 | * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size |
106 | * can either be "sizeof(struct GetMessage)" or | 106 | * can either be "sizeof(struct GetMessage)" or |
107 | * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"! | 107 | * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"! |
108 | */ | 108 | */ |
109 | struct GNUNET_MessageHeader header; | 109 | struct GNUNET_MessageHeader header; |
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 8a8f64eb3..f8826ce66 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -34,7 +34,7 @@ | |||
34 | /** | 34 | /** |
35 | * If a client stopped asking for more results, how many more do | 35 | * If a client stopped asking for more results, how many more do |
36 | * we receive from the DB before killing the connection? Trade-off | 36 | * we receive from the DB before killing the connection? Trade-off |
37 | * between re-doing TCP handshakes and (needlessly) receiving | 37 | * between re-doing TCP handshakes and (needlessly) receiving |
38 | * useless results. | 38 | * useless results. |
39 | */ | 39 | */ |
40 | #define MAX_EXCESS_RESULTS 8 | 40 | #define MAX_EXCESS_RESULTS 8 |
@@ -163,7 +163,7 @@ struct GNUNET_DATASTORE_QueueEntry | |||
163 | /** | 163 | /** |
164 | * Has this message been transmitted to the service? | 164 | * Has this message been transmitted to the service? |
165 | * Only ever GNUNET_YES for the head of the queue. | 165 | * Only ever GNUNET_YES for the head of the queue. |
166 | * Note that the overall struct should end at a | 166 | * Note that the overall struct should end at a |
167 | * multiple of 64 bits. | 167 | * multiple of 64 bits. |
168 | */ | 168 | */ |
169 | int was_transmitted; | 169 | int was_transmitted; |
@@ -171,7 +171,7 @@ struct GNUNET_DATASTORE_QueueEntry | |||
171 | }; | 171 | }; |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * Handle to the datastore service. | 174 | * Handle to the datastore service. |
175 | */ | 175 | */ |
176 | struct GNUNET_DATASTORE_Handle | 176 | struct GNUNET_DATASTORE_Handle |
177 | { | 177 | { |
@@ -391,7 +391,7 @@ timeout_queue_entry (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
391 | * @param timeout timeout for the operation | 391 | * @param timeout timeout for the operation |
392 | * @param response_proc function to call with replies (can be NULL) | 392 | * @param response_proc function to call with replies (can be NULL) |
393 | * @param qc client context (NOT a closure for response_proc) | 393 | * @param qc client context (NOT a closure for response_proc) |
394 | * @return NULL if the queue is full | 394 | * @return NULL if the queue is full |
395 | */ | 395 | */ |
396 | static struct GNUNET_DATASTORE_QueueEntry * | 396 | static struct GNUNET_DATASTORE_QueueEntry * |
397 | make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, | 397 | make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, |
@@ -452,7 +452,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, | |||
452 | if ((pos->max_queue < h->queue_size) && (pos->was_transmitted == GNUNET_NO)) | 452 | if ((pos->max_queue < h->queue_size) && (pos->was_transmitted == GNUNET_NO)) |
453 | { | 453 | { |
454 | GNUNET_assert (pos->response_proc != NULL); | 454 | GNUNET_assert (pos->response_proc != NULL); |
455 | /* move 'pos' element to head so that it will be | 455 | /* move 'pos' element to head so that it will be |
456 | * killed on 'NULL' call below */ | 456 | * killed on 'NULL' call below */ |
457 | #if DEBUG_DATASTORE | 457 | #if DEBUG_DATASTORE |
458 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 458 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -477,7 +477,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, | |||
477 | /** | 477 | /** |
478 | * Process entries in the queue (or do nothing if we are already | 478 | * Process entries in the queue (or do nothing if we are already |
479 | * doing so). | 479 | * doing so). |
480 | * | 480 | * |
481 | * @param h handle to the datastore | 481 | * @param h handle to the datastore |
482 | */ | 482 | */ |
483 | static void | 483 | static void |
@@ -637,7 +637,7 @@ transmit_request (void *cls, size_t size, void *buf) | |||
637 | /** | 637 | /** |
638 | * Process entries in the queue (or do nothing if we are already | 638 | * Process entries in the queue (or do nothing if we are already |
639 | * doing so). | 639 | * doing so). |
640 | * | 640 | * |
641 | * @param h handle to the datastore | 641 | * @param h handle to the datastore |
642 | */ | 642 | */ |
643 | static void | 643 | static void |
@@ -696,7 +696,7 @@ process_queue (struct GNUNET_DATASTORE_Handle *h) | |||
696 | * Dummy continuation used to do nothing (but be non-zero). | 696 | * Dummy continuation used to do nothing (but be non-zero). |
697 | * | 697 | * |
698 | * @param cls closure | 698 | * @param cls closure |
699 | * @param result result | 699 | * @param result result |
700 | * @param emsg error message | 700 | * @param emsg error message |
701 | */ | 701 | */ |
702 | static void | 702 | static void |
@@ -710,7 +710,7 @@ drop_status_cont (void *cls, int32_t result, const char *emsg) | |||
710 | * Free a queue entry. Removes the given entry from the | 710 | * Free a queue entry. Removes the given entry from the |
711 | * queue and releases associated resources. Does NOT | 711 | * queue and releases associated resources. Does NOT |
712 | * call the callback. | 712 | * call the callback. |
713 | * | 713 | * |
714 | * @param qe entry to free. | 714 | * @param qe entry to free. |
715 | */ | 715 | */ |
716 | static void | 716 | static void |
@@ -1478,7 +1478,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset, | |||
1478 | /** | 1478 | /** |
1479 | * Cancel a datastore operation. The final callback from the | 1479 | * Cancel a datastore operation. The final callback from the |
1480 | * operation must not have been done yet. | 1480 | * operation must not have been done yet. |
1481 | * | 1481 | * |
1482 | * @param qe operation to cancel | 1482 | * @param qe operation to cancel |
1483 | */ | 1483 | */ |
1484 | void | 1484 | void |
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index d6a0b3c81..29f68d8bb 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c | |||
@@ -199,7 +199,7 @@ static struct GNUNET_STATISTICS_Handle *stats; | |||
199 | 199 | ||
200 | 200 | ||
201 | /** | 201 | /** |
202 | * Synchronize our utilization statistics with the | 202 | * Synchronize our utilization statistics with the |
203 | * statistics service. | 203 | * statistics service. |
204 | */ | 204 | */ |
205 | static void | 205 | static void |
@@ -857,7 +857,7 @@ execute_put (struct GNUNET_SERVER_Client *client, const struct DataMessage *dm) | |||
857 | * maybe 0 if no unique identifier is available | 857 | * maybe 0 if no unique identifier is available |
858 | * | 858 | * |
859 | * @return GNUNET_OK usually | 859 | * @return GNUNET_OK usually |
860 | * GNUNET_NO to delete the item | 860 | * GNUNET_NO to delete the item |
861 | */ | 861 | */ |
862 | static int | 862 | static int |
863 | check_present (void *cls, const GNUNET_HashCode * key, uint32_t size, | 863 | check_present (void *cls, const GNUNET_HashCode * key, uint32_t size, |
@@ -1214,7 +1214,7 @@ handle_drop (void *cls, struct GNUNET_SERVER_Client *client, | |||
1214 | * change in their disk utilization. | 1214 | * change in their disk utilization. |
1215 | * | 1215 | * |
1216 | * @param cls closure (NULL) | 1216 | * @param cls closure (NULL) |
1217 | * @param delta change in disk utilization, | 1217 | * @param delta change in disk utilization, |
1218 | * 0 for "reset to empty" | 1218 | * 0 for "reset to empty" |
1219 | */ | 1219 | */ |
1220 | static void | 1220 | static void |
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c index 36dc84656..ac3be4d5c 100644 --- a/src/datastore/perf_plugin_datastore.c +++ b/src/datastore/perf_plugin_datastore.c | |||
@@ -90,7 +90,7 @@ struct CpsRunContext | |||
90 | * change in their disk utilization. | 90 | * change in their disk utilization. |
91 | * | 91 | * |
92 | * @param cls closure (NULL) | 92 | * @param cls closure (NULL) |
93 | * @param delta change in disk utilization, | 93 | * @param delta change in disk utilization, |
94 | * 0 for "reset to empty" | 94 | * 0 for "reset to empty" |
95 | */ | 95 | */ |
96 | static void | 96 | static void |
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c index d6b6d6c62..0448b7299 100644 --- a/src/datastore/plugin_datastore_mysql.c +++ b/src/datastore/plugin_datastore_mysql.c | |||
@@ -331,7 +331,7 @@ get_my_cnf_path (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
331 | /** | 331 | /** |
332 | * Close database connection and all prepared statements (we got a DB | 332 | * Close database connection and all prepared statements (we got a DB |
333 | * disconnect error). | 333 | * disconnect error). |
334 | * | 334 | * |
335 | * @param plugin plugin context | 335 | * @param plugin plugin context |
336 | */ | 336 | */ |
337 | static int | 337 | static int |
@@ -1025,7 +1025,7 @@ execute_select (struct Plugin *plugin, struct GNUNET_MysqlStatementHandle *stmt, | |||
1025 | * Get one of the results for a particular key in the datastore. | 1025 | * Get one of the results for a particular key in the datastore. |
1026 | * | 1026 | * |
1027 | * @param cls closure | 1027 | * @param cls closure |
1028 | * @param offset offset of the result (modulo num-results); | 1028 | * @param offset offset of the result (modulo num-results); |
1029 | * specific ordering does not matter for the offset | 1029 | * specific ordering does not matter for the offset |
1030 | * @param key key to match, never NULL | 1030 | * @param key key to match, never NULL |
1031 | * @param vhash hash of the value, maybe NULL (to | 1031 | * @param vhash hash of the value, maybe NULL (to |
@@ -1035,7 +1035,7 @@ execute_select (struct Plugin *plugin, struct GNUNET_MysqlStatementHandle *stmt, | |||
1035 | * there may be! | 1035 | * there may be! |
1036 | * @param type entries of which type are relevant? | 1036 | * @param type entries of which type are relevant? |
1037 | * Use 0 for any type. | 1037 | * Use 0 for any type. |
1038 | * @param proc function to call on the matching value, | 1038 | * @param proc function to call on the matching value, |
1039 | * with NULL for if no value matches | 1039 | * with NULL for if no value matches |
1040 | * @param proc_cls closure for proc | 1040 | * @param proc_cls closure for proc |
1041 | */ | 1041 | */ |
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index d71d5e0ef..4e44107b6 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c | |||
@@ -65,7 +65,7 @@ struct Plugin | |||
65 | * Check if the result obtained from Postgres has | 65 | * Check if the result obtained from Postgres has |
66 | * the desired status code. If not, log an error, clear the | 66 | * the desired status code. If not, log an error, clear the |
67 | * result and return GNUNET_SYSERR. | 67 | * result and return GNUNET_SYSERR. |
68 | * | 68 | * |
69 | * @param plugin global context | 69 | * @param plugin global context |
70 | * @param ret result to check | 70 | * @param ret result to check |
71 | * @param expected_status expected return value | 71 | * @param expected_status expected return value |
@@ -582,7 +582,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc, | |||
582 | * in the datastore. | 582 | * in the datastore. |
583 | * | 583 | * |
584 | * @param cls closure | 584 | * @param cls closure |
585 | * @param offset offset of the result (modulo num-results); | 585 | * @param offset offset of the result (modulo num-results); |
586 | * specific ordering does not matter for the offset | 586 | * specific ordering does not matter for the offset |
587 | * @param key maybe NULL (to match all entries) | 587 | * @param key maybe NULL (to match all entries) |
588 | * @param vhash hash of the value, maybe NULL (to | 588 | * @param vhash hash of the value, maybe NULL (to |
@@ -822,7 +822,7 @@ repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
822 | 822 | ||
823 | /** | 823 | /** |
824 | * Get a random item for replication. Returns a single, not expired, random item | 824 | * Get a random item for replication. Returns a single, not expired, random item |
825 | * from those with the highest replication counters. The item's | 825 | * from those with the highest replication counters. The item's |
826 | * replication counter is decremented by one IF it was positive before. | 826 | * replication counter is decremented by one IF it was positive before. |
827 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. | 827 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. |
828 | * | 828 | * |
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 46486d933..4a66c44ca 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c | |||
@@ -1,17 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * This file is part of GNUnet | 2 | * This file is part of GNUnet |
3 | * (C) 2009, 2011 Christian Grothoff (and other contributing authors) | 3 | * (C) 2009, 2011 Christian Grothoff (and other contributing authors) |
4 | * | 4 | * |
5 | * GNUnet is free software; you can redistribute it and/or modify | 5 | * GNUnet is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published | 6 | * it under the terms of the GNU General Public License as published |
7 | * by the Free Software Foundation; either version 3, or (at your | 7 | * by the Free Software Foundation; either version 3, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
10 | * GNUnet is distributed in the hope that it will be useful, but | 10 | * GNUnet is distributed in the hope that it will be useful, but |
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * General Public License for more details. | 13 | * General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with GNUnet; see the file COPYING. If not, write to the | 16 | * along with GNUnet; see the file COPYING. If not, write to the |
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
@@ -157,7 +157,7 @@ sq_prepare (sqlite3 * dbh, const char *zSql, sqlite3_stmt ** ppStmt) | |||
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Create our database indices. | 159 | * Create our database indices. |
160 | * | 160 | * |
161 | * @param dbh handle to the database | 161 | * @param dbh handle to the database |
162 | */ | 162 | */ |
163 | static void | 163 | static void |
@@ -724,7 +724,7 @@ execute_get (struct Plugin *plugin, sqlite3_stmt * stmt, | |||
724 | * the given processor for the item. | 724 | * the given processor for the item. |
725 | * | 725 | * |
726 | * @param cls our plugin context | 726 | * @param cls our plugin context |
727 | * @param offset offset of the result (modulo num-results); | 727 | * @param offset offset of the result (modulo num-results); |
728 | * specific ordering does not matter for the offset | 728 | * specific ordering does not matter for the offset |
729 | * @param type entries of which type should be considered? | 729 | * @param type entries of which type should be considered? |
730 | * Use 0 for any type. | 730 | * Use 0 for any type. |
@@ -947,7 +947,7 @@ repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
947 | 947 | ||
948 | /** | 948 | /** |
949 | * Get a random item for replication. Returns a single random item | 949 | * Get a random item for replication. Returns a single random item |
950 | * from those with the highest replication counters. The item's | 950 | * from those with the highest replication counters. The item's |
951 | * replication counter is decremented by one IF it was positive before. | 951 | * replication counter is decremented by one IF it was positive before. |
952 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. | 952 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. |
953 | * | 953 | * |
diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c index 566155fb5..174d3d255 100644 --- a/src/datastore/plugin_datastore_template.c +++ b/src/datastore/plugin_datastore_template.c | |||
@@ -87,7 +87,7 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
87 | * Get one of the results for a particular key in the datastore. | 87 | * Get one of the results for a particular key in the datastore. |
88 | * | 88 | * |
89 | * @param cls closure | 89 | * @param cls closure |
90 | * @param offset offset of the result (modulo num-results); | 90 | * @param offset offset of the result (modulo num-results); |
91 | * specific ordering does not matter for the offset | 91 | * specific ordering does not matter for the offset |
92 | * @param key maybe NULL (to match all entries) | 92 | * @param key maybe NULL (to match all entries) |
93 | * @param vhash hash of the value, maybe NULL (to | 93 | * @param vhash hash of the value, maybe NULL (to |
@@ -185,7 +185,7 @@ template_plugin_update (void *cls, uint64_t uid, int delta, | |||
185 | * Call the given processor on an item with zero anonymity. | 185 | * Call the given processor on an item with zero anonymity. |
186 | * | 186 | * |
187 | * @param cls our "struct Plugin*" | 187 | * @param cls our "struct Plugin*" |
188 | * @param offset offset of the result (modulo num-results); | 188 | * @param offset offset of the result (modulo num-results); |
189 | * specific ordering does not matter for the offset | 189 | * specific ordering does not matter for the offset |
190 | * @param type entries of which type should be considered? | 190 | * @param type entries of which type should be considered? |
191 | * Use 0 for any type. | 191 | * Use 0 for any type. |
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c index 3a924c7b6..373e8f453 100644 --- a/src/datastore/test_plugin_datastore.c +++ b/src/datastore/test_plugin_datastore.c | |||
@@ -74,7 +74,7 @@ struct CpsRunContext | |||
74 | * change in their disk utilization. | 74 | * change in their disk utilization. |
75 | * | 75 | * |
76 | * @param cls closure (NULL) | 76 | * @param cls closure (NULL) |
77 | * @param delta change in disk utilization, | 77 | * @param delta change in disk utilization, |
78 | * 0 for "reset to empty" | 78 | * 0 for "reset to empty" |
79 | */ | 79 | */ |
80 | static void | 80 | static void |