diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-07 11:47:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-07 11:47:47 +0000 |
commit | 1893283990d3c128c67da900fde4b8c71b1939a7 (patch) | |
tree | 288ff80a631e6c169340b4ba3508c387c146f220 /src/my/my.c | |
parent | f1a8e79f1cff6a135297cf4eabb6db4733456ad5 (diff) | |
download | gnunet-1893283990d3c128c67da900fde4b8c71b1939a7.tar.gz gnunet-1893283990d3c128c67da900fde4b8c71b1939a7.zip |
-fix misc issues
Diffstat (limited to 'src/my/my.c')
-rw-r--r-- | src/my/my.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/my/my.c b/src/my/my.c index 93b0a05b4..841ef28a4 100644 --- a/src/my/my.c +++ b/src/my/my.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #GNUNET_YES if we can prepare all statement | 39 | #GNUNET_YES if we can prepare all statement |
40 | #GNUNET_SYSERR if we can't prepare all statement | 40 | #GNUNET_SYSERR if we can't prepare all statement |
41 | */ | 41 | */ |
42 | |||
43 | int | 42 | int |
44 | GNUNET_MY_exec_prepared (struct GNUNET_MYSQL_Context *mc, | 43 | GNUNET_MY_exec_prepared (struct GNUNET_MYSQL_Context *mc, |
45 | struct GNUNET_MYSQL_StatementHandle *sh, | 44 | struct GNUNET_MYSQL_StatementHandle *sh, |
@@ -82,15 +81,15 @@ GNUNET_MY_exec_prepared (struct GNUNET_MYSQL_Context *mc, | |||
82 | return GNUNET_SYSERR; | 81 | return GNUNET_SYSERR; |
83 | } | 82 | } |
84 | 83 | ||
85 | } | 84 | if (mysql_stmt_execute (stmt)) |
86 | if (mysql_stmt_execute (stmt)) | 85 | { |
87 | { | 86 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "mysql", |
88 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "mysql", | 87 | _("`%s' failed at %s:%d with error: %s\n"), |
89 | _("`%s' failed at %s:%d with error: %s\n"), | 88 | "mysql_stmt_execute", __FILE__, __LINE__, |
90 | "mysql_stmt_execute", __FILE__, __LINE__, | 89 | mysql_stmt_error (stmt)); |
91 | mysql_stmt_error (stmt)); | 90 | GNUNET_MYSQL_statements_invalidate (mc); |
92 | GNUNET_MYSQL_statements_invalidate (mc); | 91 | return GNUNET_SYSERR; |
93 | return GNUNET_SYSERR; | 92 | } |
94 | } | 93 | } |
95 | 94 | ||
96 | return GNUNET_OK; | 95 | return GNUNET_OK; |
@@ -175,7 +174,7 @@ GNUNET_MY_extract_result (struct GNUNET_MYSQL_StatementHandle *sh, | |||
175 | } | 174 | } |
176 | 175 | ||
177 | ret = mysql_stmt_fetch (stmt); | 176 | ret = mysql_stmt_fetch (stmt); |
178 | 177 | ||
179 | if (MYSQL_NO_DATA == ret) | 178 | if (MYSQL_NO_DATA == ret) |
180 | return GNUNET_NO; | 179 | return GNUNET_NO; |
181 | if ((0 != ret ) & (MYSQL_DATA_TRUNCATED != ret)) | 180 | if ((0 != ret ) & (MYSQL_DATA_TRUNCATED != ret)) |