diff options
Diffstat (limited to 'src/my/my_query_helper.c')
-rw-r--r-- | src/my/my_query_helper.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/my/my_query_helper.c b/src/my/my_query_helper.c index 6bbbf0b51..07eb2481d 100644 --- a/src/my/my_query_helper.c +++ b/src/my/my_query_helper.c | |||
@@ -61,11 +61,11 @@ GNUNET_MY_query_param_fixed_size (const void *ptr, | |||
61 | size_t ptr_size) | 61 | size_t ptr_size) |
62 | { | 62 | { |
63 | struct GNUNET_MY_QueryParam qp = { | 63 | struct GNUNET_MY_QueryParam qp = { |
64 | &my_conv_fixed_size, | 64 | .conv = &my_conv_fixed_size, |
65 | NULL, | 65 | .conv_cls = NULL, |
66 | 1, | 66 | .num_params = 1, |
67 | ptr, | 67 | .data = ptr, |
68 | (unsigned long) ptr_size | 68 | .data_len = (unsigned long) ptr_size |
69 | }; | 69 | }; |
70 | return qp; | 70 | return qp; |
71 | } | 71 | } |
@@ -125,11 +125,11 @@ struct GNUNET_MY_QueryParam | |||
125 | GNUNET_MY_query_param_uint16 (const uint16_t *x) | 125 | GNUNET_MY_query_param_uint16 (const uint16_t *x) |
126 | { | 126 | { |
127 | struct GNUNET_MY_QueryParam res = { | 127 | struct GNUNET_MY_QueryParam res = { |
128 | &my_conv_uint16, | 128 | .conv = &my_conv_uint16, |
129 | NULL, | 129 | .conv_cls = NULL, |
130 | 1, | 130 | .num_params = 1, |
131 | x, | 131 | .data = x, |
132 | sizeof (*x) | 132 | .data_len = sizeof (*x) |
133 | }; | 133 | }; |
134 | 134 | ||
135 | return res; | 135 | return res; |
@@ -173,11 +173,11 @@ struct GNUNET_MY_QueryParam | |||
173 | GNUNET_MY_query_param_uint32 (const uint32_t *x) | 173 | GNUNET_MY_query_param_uint32 (const uint32_t *x) |
174 | { | 174 | { |
175 | struct GNUNET_MY_QueryParam res = { | 175 | struct GNUNET_MY_QueryParam res = { |
176 | &my_conv_uint32, | 176 | .conv = &my_conv_uint32, |
177 | NULL, | 177 | .conv_cls = NULL, |
178 | 1, | 178 | .num_params = 1, |
179 | x, | 179 | .data = x, |
180 | sizeof (*x) | 180 | .data_len = sizeof (*x) |
181 | }; | 181 | }; |
182 | 182 | ||
183 | return res; | 183 | return res; |
@@ -221,11 +221,11 @@ struct GNUNET_MY_QueryParam | |||
221 | GNUNET_MY_query_param_uint64 (const uint64_t *x) | 221 | GNUNET_MY_query_param_uint64 (const uint64_t *x) |
222 | { | 222 | { |
223 | struct GNUNET_MY_QueryParam res = { | 223 | struct GNUNET_MY_QueryParam res = { |
224 | &my_conv_uint64, | 224 | .conv = &my_conv_uint64, |
225 | NULL, | 225 | .conv_cls = NULL, |
226 | 1, | 226 | .num_params = 1, |
227 | x, | 227 | .data = x, |
228 | sizeof(*x) | 228 | .data_len = sizeof(*x) |
229 | }; | 229 | }; |
230 | 230 | ||
231 | return res; | 231 | return res; |
@@ -253,8 +253,8 @@ my_conv_rsa_public_key (void *cls, | |||
253 | buf_size = GNUNET_CRYPTO_rsa_public_key_encode (rsa, &buf); | 253 | buf_size = GNUNET_CRYPTO_rsa_public_key_encode (rsa, &buf); |
254 | 254 | ||
255 | qbind->buffer = (void *)buf; | 255 | qbind->buffer = (void *)buf; |
256 | qbind->buffer_length = buf_size - 1; | 256 | qbind->buffer_length = buf_size-1; |
257 | qbind->buffer_type = MYSQL_TYPE_LONG; | 257 | qbind->buffer_type = MYSQL_TYPE_BLOB; |
258 | 258 | ||
259 | return 1; | 259 | return 1; |
260 | } | 260 | } |
@@ -270,11 +270,11 @@ struct GNUNET_MY_QueryParam | |||
270 | GNUNET_MY_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x) | 270 | GNUNET_MY_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x) |
271 | { | 271 | { |
272 | struct GNUNET_MY_QueryParam res = { | 272 | struct GNUNET_MY_QueryParam res = { |
273 | &my_conv_rsa_public_key, | 273 | .conv = &my_conv_rsa_public_key, |
274 | NULL, | 274 | .conv_cls = NULL, |
275 | 1, | 275 | .num_params = 1, |
276 | x, | 276 | .data = x, |
277 | 0 | 277 | .data_len = 0 |
278 | }; | 278 | }; |
279 | 279 | ||
280 | return res; | 280 | return res; |
@@ -303,8 +303,8 @@ my_conv_rsa_signature (void *cls, | |||
303 | &buf); | 303 | &buf); |
304 | 304 | ||
305 | qbind->buffer = (void *)buf; | 305 | qbind->buffer = (void *)buf; |
306 | qbind->buffer_length = buf_size - 1; | 306 | qbind->buffer_length = buf_size-1; |
307 | qbind->buffer_type = MYSQL_TYPE_LONG; | 307 | qbind->buffer_type = MYSQL_TYPE_BLOB; |
308 | 308 | ||
309 | return 1; | 309 | return 1; |
310 | } | 310 | } |
@@ -320,11 +320,11 @@ struct GNUNET_MY_QueryParam | |||
320 | GNUNET_MY_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x) | 320 | GNUNET_MY_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x) |
321 | { | 321 | { |
322 | struct GNUNET_MY_QueryParam res = { | 322 | struct GNUNET_MY_QueryParam res = { |
323 | &my_conv_rsa_signature, | 323 | .conv = &my_conv_rsa_signature, |
324 | NULL, | 324 | .conv_cls = NULL, |
325 | 1, | 325 | .num_params = 1, |
326 | (x), | 326 | .data = (x), |
327 | 0 | 327 | .data_len = 0 |
328 | }; | 328 | }; |
329 | return res; | 329 | return res; |
330 | } | 330 | } |