aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-09-06 20:48:11 +0000
committerChristian Grothoff <christian@grothoff.org>2010-09-06 20:48:11 +0000
commitfba669741d6686052308b915203aca8c5788c035 (patch)
tree257b1d94179edbc37be4349c0aefa22532863cb0
parent423736ee4df736eb39ec8072526c9a61d341b5d6 (diff)
downloadgnunet-fba669741d6686052308b915203aca8c5788c035.tar.gz
gnunet-fba669741d6686052308b915203aca8c5788c035.zip
fixes
-rw-r--r--TODO5
-rw-r--r--contrib/gnunet.doxy1
-rw-r--r--src/arm/gnunet-service-arm.c1
-rw-r--r--src/core/core_api.c1
-rw-r--r--src/core/gnunet-service-core.c2
-rw-r--r--src/datacache/plugin_datacache_mysql.c50
-rw-r--r--src/datastore/plugin_datastore_mysql.c86
-rw-r--r--src/datastore/plugin_datastore_postgres.c7
8 files changed, 95 insertions, 58 deletions
diff --git a/TODO b/TODO
index 8ac9a592c..ee4c37b32 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,9 @@
10.9.0pre2: 10.9.0pre2:
2* FS:
3 - namespace_list_updateable testcase [CG]
4 (currently, updateable content does NOT show in GTK)
5* GTK:
6 - local namespace not listed in fs-search dialog (?) [CG]
2* CORE: 7* CORE:
3 - derived key generation [Nils] 8 - derived key generation [Nils]
4 - Jun 27 11:51:54 core-7670 ERROR Assertion failed at gnunet-service-core.c:3616. 9 - Jun 27 11:51:54 core-7670 ERROR Assertion failed at gnunet-service-core.c:3616.
diff --git a/contrib/gnunet.doxy b/contrib/gnunet.doxy
index fb959ec2a..2477dcef2 100644
--- a/contrib/gnunet.doxy
+++ b/contrib/gnunet.doxy
@@ -32,7 +32,6 @@ SHORT_NAMES = NO
32JAVADOC_AUTOBRIEF = YES 32JAVADOC_AUTOBRIEF = YES
33QT_AUTOBRIEF = NO 33QT_AUTOBRIEF = NO
34MULTILINE_CPP_IS_BRIEF = NO 34MULTILINE_CPP_IS_BRIEF = NO
35DETAILS_AT_TOP = NO
36INHERIT_DOCS = YES 35INHERIT_DOCS = YES
37SEPARATE_MEMBER_PAGES = NO 36SEPARATE_MEMBER_PAGES = NO
38TAB_SIZE = 8 37TAB_SIZE = 8
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index b63d56a32..31539172f 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -342,6 +342,7 @@ free_entry (struct ServiceList *pos)
342 * Actually start the process for the given service. 342 * Actually start the process for the given service.
343 * 343 *
344 * @param sl identifies service to start 344 * @param sl identifies service to start
345 * @param -1 terminated list of listen sockets to pass (systemd style), or NULL
345 */ 346 */
346static void 347static void
347start_process (struct ServiceList *sl, 348start_process (struct ServiceList *sl,
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 16aa788f9..c21be318a 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -727,6 +727,7 @@ transmit_start (void *cls, size_t size, void *buf)
727 * connected to the core service; note that timeout is only meaningful if init is not NULL 727 * connected to the core service; note that timeout is only meaningful if init is not NULL
728 * @param connects function to call on peer connect, can be NULL 728 * @param connects function to call on peer connect, can be NULL
729 * @param disconnects function to call on peer disconnect / timeout, can be NULL 729 * @param disconnects function to call on peer disconnect / timeout, can be NULL
730 * @param status_events function to call on changes to peer connection status, can be NULL
730 * @param inbound_notify function to call for all inbound messages, can be NULL 731 * @param inbound_notify function to call for all inbound messages, can be NULL
731 * @param inbound_hdr_only set to GNUNET_YES if inbound_notify will only read the 732 * @param inbound_hdr_only set to GNUNET_YES if inbound_notify will only read the
732 * GNUNET_MessageHeader and hence we do not need to give it the full message; 733 * GNUNET_MessageHeader and hence we do not need to give it the full message;
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index c4643deec..e10d03343 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -833,7 +833,7 @@ send_to_all_clients (const struct GNUNET_MessageHeader *msg,
833 * Function called by transport telling us that a peer 833 * Function called by transport telling us that a peer
834 * changed status. 834 * changed status.
835 * 835 *
836 * @param peer the peer that changed status 836 * @param n the peer that changed status
837 */ 837 */
838static void 838static void
839handle_peer_status_change (struct Neighbour *n) 839handle_peer_status_change (struct Neighbour *n)
diff --git a/src/datacache/plugin_datacache_mysql.c b/src/datacache/plugin_datacache_mysql.c
index 4559a9d39..d83d18cd6 100644
--- a/src/datacache/plugin_datacache_mysql.c
+++ b/src/datacache/plugin_datacache_mysql.c
@@ -33,24 +33,20 @@
33 * </pre> 33 * </pre>
34 * and do the following. [You should replace $USER with the username 34 * and do the following. [You should replace $USER with the username
35 * that will be running the gnunetd process]. 35 * that will be running the gnunetd process].
36 * <pre> 36 * @verbatim
37 *
38 CREATE DATABASE gnunet; 37 CREATE DATABASE gnunet;
39 GRANT select,insert,update,delete,create,alter,drop,create temporary tables 38 GRANT select,insert,update,delete,create,alter,drop,create temporary tables
40 ON gnunet.* TO $USER@localhost; 39 ON gnunet.* TO $USER@localhost;
41 SET PASSWORD FOR $USER@localhost=PASSWORD('$the_password_you_like'); 40 SET PASSWORD FOR $USER@localhost=PASSWORD('$the_password_you_like');
42 FLUSH PRIVILEGES; 41 FLUSH PRIVILEGES;
43 * 42 * @endverbatim
44 * </pre>
45 * 2) In the $HOME directory of $USER, create a ".my.cnf" file 43 * 2) In the $HOME directory of $USER, create a ".my.cnf" file
46 * with the following lines 44 * with the following lines
47 * <pre> 45 * @verbatim
48
49 [client] 46 [client]
50 user=$USER 47 user=$USER
51 password=$the_password_you_like 48 password=$the_password_you_like
52 49 * @endverbatim
53 * </pre>
54 * 50 *
55 * Thats it -- now you can configure your datastores in GNUnet to 51 * Thats it -- now you can configure your datastores in GNUnet to
56 * use MySQL. Note that .my.cnf file is a security risk unless its on 52 * use MySQL. Note that .my.cnf file is a security risk unless its on
@@ -62,11 +58,10 @@
62 * 58 *
63 * 3) Still, perhaps you should briefly try if the DB connection 59 * 3) Still, perhaps you should briefly try if the DB connection
64 * works. First, login as $USER. Then use, 60 * works. First, login as $USER. Then use,
65 * 61 * @verbatim
66 * <pre> 62 $ mysql -u $USER -p $the_password_you_like
67 * $ mysql -u $USER -p $the_password_you_like 63 mysql> use gnunet;
68 * mysql> use gnunet; 64 * @endverbatim
69 * </pre>
70 * 65 *
71 * If you get the message &quot;Database changed&quot; it probably works. 66 * If you get the message &quot;Database changed&quot; it probably works.
72 * 67 *
@@ -75,19 +70,6 @@
75 * &quot;ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock&quot; 70 * &quot;ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock&quot;
76 * so there may be some additional trouble depending on your mysql setup.] 71 * so there may be some additional trouble depending on your mysql setup.]
77 * 72 *
78 * REPAIRING TABLES:
79 * - Its probably healthy to check your tables for inconsistencies
80 * every now and then.
81 * - If you get odd SEGVs on gnunetd startup, it might be that the mysql
82 * databases have been corrupted.
83 * - The tables can be verified/fixed in two ways;
84 * 1) by running mysqlcheck -A, or
85 * 2) by executing (inside of mysql using the GNUnet database):
86 * mysql> SHOW TABLES;
87 * mysql> REPAIR TABLE gnXXX;
88 *
89 * Make sure to replace XXX with the actual names of all tables.
90 *
91 * PROBLEMS? 73 * PROBLEMS?
92 * 74 *
93 * If you have problems related to the mysql module, your best 75 * If you have problems related to the mysql module, your best
@@ -191,6 +173,8 @@ struct Plugin
191 173
192/** 174/**
193 * Obtain the location of ".my.cnf". 175 * Obtain the location of ".my.cnf".
176 *
177 * @param cfg our configuration
194 * @return NULL on error 178 * @return NULL on error
195 */ 179 */
196static char * 180static char *
@@ -251,6 +235,9 @@ get_my_cnf_path (const struct GNUNET_CONFIGURATION_Handle *cfg)
251 235
252/** 236/**
253 * Free a prepared statement. 237 * Free a prepared statement.
238 *
239 * @param plugin plugin context
240 * @param s prepared statement
254 */ 241 */
255static void 242static void
256prepared_statement_destroy (struct Plugin *plugin, 243prepared_statement_destroy (struct Plugin *plugin,
@@ -467,6 +454,7 @@ prepare_statement (struct Plugin *plugin,
467 * Bind the parameters for the given MySQL statement 454 * Bind the parameters for the given MySQL statement
468 * and run it. 455 * and run it.
469 * 456 *
457 * @param plugin plugin context
470 * @param s statement to bind and run 458 * @param s statement to bind and run
471 * @param ap arguments for the binding 459 * @param ap arguments for the binding
472 * @return GNUNET_SYSERR on error, GNUNET_OK on success 460 * @return GNUNET_SYSERR on error, GNUNET_OK on success
@@ -565,6 +553,8 @@ typedef int (*GNUNET_MysqlDataProcessor) (void *cls,
565/** 553/**
566 * Run a prepared SELECT statement. 554 * Run a prepared SELECT statement.
567 * 555 *
556 * @param plugin plugin context
557 * @param s handle to SELECT statment
568 * @param result_size number of elements in results array 558 * @param result_size number of elements in results array
569 * @param results pointer to already initialized MYSQL_BIND 559 * @param results pointer to already initialized MYSQL_BIND
570 * array (of sufficient size) for passing results 560 * array (of sufficient size) for passing results
@@ -649,6 +639,8 @@ prepared_statement_run_select (struct Plugin *plugin,
649/** 639/**
650 * Run a prepared statement that does NOT produce results. 640 * Run a prepared statement that does NOT produce results.
651 * 641 *
642 * @param plugin plugin context
643 * @param s handle to SELECT statment
652 * @param ... pairs and triplets of "MYSQL_TYPE_XXX" keys and their respective 644 * @param ... pairs and triplets of "MYSQL_TYPE_XXX" keys and their respective
653 * values (size + buffer-reference for pointers); terminated 645 * values (size + buffer-reference for pointers); terminated
654 * with "-1" 646 * with "-1"
@@ -682,6 +674,12 @@ prepared_statement_run (struct Plugin *plugin,
682} 674}
683 675
684 676
677/**
678 * Create temporary table and prepare statements.
679 *
680 * @param plugin plugin context
681 * @return GNUNET_OK on success
682 */
685static int 683static int
686itable (struct Plugin *plugin) 684itable (struct Plugin *plugin)
687{ 685{
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index ea6cc2322..51a60a1dc 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -48,36 +48,30 @@
48 * MANUAL SETUP INSTRUCTIONS 48 * MANUAL SETUP INSTRUCTIONS
49 * 49 *
50 * 1) in /etc/gnunet.conf, set 50 * 1) in /etc/gnunet.conf, set
51 * <pre> 51 * @verbatim
52 * [datastore] 52 * [datastore]
53 * DATABASE = "mysql" 53 * DATABASE = "mysql"
54 * </pre> 54 * @endverbatim
55 * 2) Then access mysql as root, 55 * 2) Then access mysql as root,
56 * <pre> 56 * @verbatim
57 * 57 $ mysql -u root -p
58 * $ mysql -u root -p 58 * @endverbatim
59 *
60 * </pre>
61 * and do the following. [You should replace $USER with the username 59 * and do the following. [You should replace $USER with the username
62 * that will be running the gnunetd process]. 60 * that will be running the gnunetd process].
63 * <pre> 61 * @verbatim
64 *
65 CREATE DATABASE gnunet; 62 CREATE DATABASE gnunet;
66 GRANT select,insert,update,delete,create,alter,drop,create temporary tables 63 GRANT select,insert,update,delete,create,alter,drop,create temporary tables
67 ON gnunet.* TO $USER@localhost; 64 ON gnunet.* TO $USER@localhost;
68 SET PASSWORD FOR $USER@localhost=PASSWORD('$the_password_you_like'); 65 SET PASSWORD FOR $USER@localhost=PASSWORD('$the_password_you_like');
69 FLUSH PRIVILEGES; 66 FLUSH PRIVILEGES;
70 * 67 * @endverbatim
71 * </pre>
72 * 3) In the $HOME directory of $USER, create a ".my.cnf" file 68 * 3) In the $HOME directory of $USER, create a ".my.cnf" file
73 * with the following lines 69 * with the following lines
74 * <pre> 70 * @verbatim
75
76 [client] 71 [client]
77 user=$USER 72 user=$USER
78 password=$the_password_you_like 73 password=$the_password_you_like
79 74 * @endverbatim
80 * </pre>
81 * 75 *
82 * Thats it. Note that .my.cnf file is a security risk unless its on 76 * Thats it. Note that .my.cnf file is a security risk unless its on
83 * a safe partition etc. The $HOME/.my.cnf can of course be a symbolic 77 * a safe partition etc. The $HOME/.my.cnf can of course be a symbolic
@@ -89,10 +83,10 @@
89 * 4) Still, perhaps you should briefly try if the DB connection 83 * 4) Still, perhaps you should briefly try if the DB connection
90 * works. First, login as $USER. Then use, 84 * works. First, login as $USER. Then use,
91 * 85 *
92 * <pre> 86 * @verbatim
93 * $ mysql -u $USER -p $the_password_you_like 87 $ mysql -u $USER -p $the_password_you_like
94 * mysql> use gnunet; 88 mysql> use gnunet;
95 * </pre> 89 * @endverbatim
96 * 90 *
97 * If you get the message &quot;Database changed&quot; it probably works. 91 * If you get the message &quot;Database changed&quot; it probably works.
98 * 92 *
@@ -110,8 +104,10 @@
110 * - The tables can be verified/fixed in two ways; 104 * - The tables can be verified/fixed in two ways;
111 * 1) by running mysqlcheck -A, or 105 * 1) by running mysqlcheck -A, or
112 * 2) by executing (inside of mysql using the GNUnet database): 106 * 2) by executing (inside of mysql using the GNUnet database):
113 * mysql> REPAIR TABLE gn090; 107 * @verbatim
114 * mysql> REPAIR TABLE gn072; 108 mysql> REPAIR TABLE gn090;
109 mysql> REPAIR TABLE gn072;
110 * @endverbatim
115 * 111 *
116 * PROBLEMS? 112 * PROBLEMS?
117 * 113 *
@@ -353,6 +349,8 @@ struct Plugin
353 349
354/** 350/**
355 * Obtain the location of ".my.cnf". 351 * Obtain the location of ".my.cnf".
352 *
353 * @param cfg our configuration
356 * @return NULL on error 354 * @return NULL on error
357 */ 355 */
358static char * 356static char *
@@ -414,6 +412,9 @@ get_my_cnf_path (const struct GNUNET_CONFIGURATION_Handle *cfg)
414 412
415/** 413/**
416 * Free a prepared statement. 414 * Free a prepared statement.
415 *
416 * @param plugin plugin context
417 * @param s prepared statement
417 */ 418 */
418static void 419static void
419prepared_statement_destroy (struct Plugin *plugin, 420prepared_statement_destroy (struct Plugin *plugin,
@@ -549,6 +550,8 @@ iopen (struct Plugin *ret)
549/** 550/**
550 * Run the given MySQL statement. 551 * Run the given MySQL statement.
551 * 552 *
553 * @param plugin plugin context
554 * @param statement SQL statement to run
552 * @return GNUNET_OK on success, GNUNET_SYSERR on error 555 * @return GNUNET_OK on success, GNUNET_SYSERR on error
553 */ 556 */
554static int 557static int
@@ -572,6 +575,8 @@ run_statement (struct Plugin *plugin,
572/** 575/**
573 * Create a prepared statement. 576 * Create a prepared statement.
574 * 577 *
578 * @param plugin plugin context
579 * @param statement SQL statement text to prepare
575 * @return NULL on error 580 * @return NULL on error
576 */ 581 */
577static struct GNUNET_MysqlStatementHandle * 582static struct GNUNET_MysqlStatementHandle *
@@ -592,6 +597,8 @@ prepared_statement_create (struct Plugin *plugin,
592/** 597/**
593 * Prepare a statement for running. 598 * Prepare a statement for running.
594 * 599 *
600 * @param plugin plugin context
601 * @param ret handle to prepared statement
595 * @return GNUNET_OK on success 602 * @return GNUNET_OK on success
596 */ 603 */
597static int 604static int
@@ -631,6 +638,7 @@ prepare_statement (struct Plugin *plugin,
631 * Bind the parameters for the given MySQL statement 638 * Bind the parameters for the given MySQL statement
632 * and run it. 639 * and run it.
633 * 640 *
641 * @param plugin plugin context
634 * @param s statement to bind and run 642 * @param s statement to bind and run
635 * @param ap arguments for the binding 643 * @param ap arguments for the binding
636 * @return GNUNET_SYSERR on error, GNUNET_OK on success 644 * @return GNUNET_SYSERR on error, GNUNET_OK on success
@@ -729,6 +737,8 @@ typedef int (*GNUNET_MysqlDataProcessor) (void *cls,
729/** 737/**
730 * Run a prepared SELECT statement. 738 * Run a prepared SELECT statement.
731 * 739 *
740 * @param plugin plugin context
741 * @param s statement to run
732 * @param result_size number of elements in results array 742 * @param result_size number of elements in results array
733 * @param results pointer to already initialized MYSQL_BIND 743 * @param results pointer to already initialized MYSQL_BIND
734 * array (of sufficient size) for passing results 744 * array (of sufficient size) for passing results
@@ -812,11 +822,13 @@ prepared_statement_run_select (struct Plugin *plugin,
812/** 822/**
813 * Run a prepared statement that does NOT produce results. 823 * Run a prepared statement that does NOT produce results.
814 * 824 *
825 * @param plugin plugin context
826 * @param s statement to run
827 * @param insert_id NULL or address where to store the row ID of whatever
828 * was inserted (only for INSERT statements!)
815 * @param ... pairs and triplets of "MYSQL_TYPE_XXX" keys and their respective 829 * @param ... pairs and triplets of "MYSQL_TYPE_XXX" keys and their respective
816 * values (size + buffer-reference for pointers); terminated 830 * values (size + buffer-reference for pointers); terminated
817 * with "-1" 831 * with "-1"
818 * @param insert_id NULL or address where to store the row ID of whatever
819 * was inserted (only for INSERT statements!)
820 * @return GNUNET_SYSERR on error, otherwise 832 * @return GNUNET_SYSERR on error, otherwise
821 * the number of successfully affected rows 833 * the number of successfully affected rows
822 */ 834 */
@@ -848,6 +860,7 @@ prepared_statement_run (struct Plugin *plugin,
848/** 860/**
849 * Delete an value from the gn072 table. 861 * Delete an value from the gn072 table.
850 * 862 *
863 * @param plugin plugin context
851 * @param vkey vkey identifying the value to delete 864 * @param vkey vkey identifying the value to delete
852 * @return GNUNET_OK on success, GNUNET_NO if no such value exists, GNUNET_SYSERR on error 865 * @return GNUNET_OK on success, GNUNET_NO if no such value exists, GNUNET_SYSERR on error
853 */ 866 */
@@ -883,6 +896,7 @@ do_delete_value (struct Plugin *plugin,
883/** 896/**
884 * Insert a value into the gn072 table. 897 * Insert a value into the gn072 table.
885 * 898 *
899 * @param plugin plugin context
886 * @param value the value to insert 900 * @param value the value to insert
887 * @param size size of the value 901 * @param size size of the value
888 * @param vkey vkey identifying the value henceforth (set) 902 * @param vkey vkey identifying the value henceforth (set)
@@ -922,6 +936,7 @@ do_insert_value (struct Plugin *plugin,
922/** 936/**
923 * Delete an entry from the gn090 table. 937 * Delete an entry from the gn090 table.
924 * 938 *
939 * @param plugin plugin context
925 * @param vkey vkey identifying the entry to delete 940 * @param vkey vkey identifying the entry to delete
926 * @return GNUNET_OK on success, GNUNET_NO if no such value exists, GNUNET_SYSERR on error 941 * @return GNUNET_OK on success, GNUNET_NO if no such value exists, GNUNET_SYSERR on error
927 */ 942 */
@@ -955,6 +970,14 @@ do_delete_entry_by_vkey (struct Plugin *plugin,
955} 970}
956 971
957 972
973/**
974 * Function that simply returns GNUNET_OK
975 *
976 * @param cls closure, not used
977 * @param num_values not used
978 * @param values not used
979 * @return GNUNET_OK
980 */
958static int 981static int
959return_ok (void *cls, 982return_ok (void *cls,
960 unsigned int num_values, 983 unsigned int num_values,
@@ -964,6 +987,13 @@ return_ok (void *cls,
964} 987}
965 988
966 989
990/**
991 * FIXME.
992 *
993 * @param cls FIXME
994 * @param ncr FIXME
995 * @return FIXME
996 */
967static int 997static int
968iterator_helper_prepare (void *cls, 998iterator_helper_prepare (void *cls,
969 struct NextRequestClosure *nrc) 999 struct NextRequestClosure *nrc)
@@ -1059,7 +1089,7 @@ iterator_helper_prepare (void *cls,
1059 */ 1089 */
1060static void 1090static void
1061mysql_next_request_cont (void *next_cls, 1091mysql_next_request_cont (void *next_cls,
1062 const struct GNUNET_SCHEDULER_TaskContext *tc) 1092 const struct GNUNET_SCHEDULER_TaskContext *tc)
1063{ 1093{
1064 struct NextRequestClosure *nrc = next_cls; 1094 struct NextRequestClosure *nrc = next_cls;
1065 struct Plugin *plugin; 1095 struct Plugin *plugin;
@@ -1239,14 +1269,16 @@ mysql_plugin_next_request (void *next_cls,
1239 * using the given query to select and order 1269 * using the given query to select and order
1240 * the items. 1270 * the items.
1241 * 1271 *
1272 * @param plugin plugin context
1242 * @param type entries of which type should be considered? 1273 * @param type entries of which type should be considered?
1243 * Use 0 for any type. 1274 * @param iter_select which iterator statement are we using
1244 * @param iter never NULL
1245 * @param is_asc are we using ascending order? 1275 * @param is_asc are we using ascending order?
1276 * @param dviter function to call on each matching item
1277 * @param dviter_cls closure for dviter
1246 */ 1278 */
1247static void 1279static void
1248iterateHelper (struct Plugin *plugin, 1280iterateHelper (struct Plugin *plugin,
1249 unsigned int type, 1281 enum GNUNET_BLOCK_Type type,
1250 int is_asc, 1282 int is_asc,
1251 unsigned int iter_select, 1283 unsigned int iter_select,
1252 PluginIterator dviter, 1284 PluginIterator dviter,
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index a5f4b2c4b..3ec38c371 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -276,6 +276,7 @@ pq_exec (struct Plugin *plugin,
276 * Prepare SQL statement. 276 * Prepare SQL statement.
277 * 277 *
278 * @param plugin global context 278 * @param plugin global context
279 * @param name name for the prepared SQL statement
279 * @param sql SQL code to prepare 280 * @param sql SQL code to prepare
280 * @param nparams number of parameters in sql 281 * @param nparams number of parameters in sql
281 * @param line code line for error reporting 282 * @param line code line for error reporting
@@ -283,10 +284,10 @@ pq_exec (struct Plugin *plugin,
283 */ 284 */
284static int 285static int
285pq_prepare (struct Plugin *plugin, 286pq_prepare (struct Plugin *plugin,
286 const char *name, const char *sql, int nparms, int line) 287 const char *name, const char *sql, int nparams, int line)
287{ 288{
288 PGresult *ret; 289 PGresult *ret;
289 ret = PQprepare (plugin->dbh, name, sql, nparms, NULL); 290 ret = PQprepare (plugin->dbh, name, sql, nparams, NULL);
290 if (GNUNET_OK != 291 if (GNUNET_OK !=
291 check_result (plugin, 292 check_result (plugin,
292 ret, PGRES_COMMAND_OK, "PQprepare", sql, line)) 293 ret, PGRES_COMMAND_OK, "PQprepare", sql, line))
@@ -648,7 +649,7 @@ postgres_plugin_put (void *cls,
648 * asking the database plugin to call the iterator 649 * asking the database plugin to call the iterator
649 * with the next item. 650 * with the next item.
650 * 651 *
651 * @param cls the 'struct NextRequestClosure' 652 * @param next_cls the 'struct NextRequestClosure'
652 * @param tc scheduler context 653 * @param tc scheduler context
653 */ 654 */
654static void 655static void