Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
houjun committed Oct 23, 2023
1 parent bd6cda7 commit 8561288
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/server/pdc_server_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -2859,27 +2859,27 @@ sqlite_get_kvtag_callback(void *data, int argc, char **argv, char **colName)
for (int i = 0; i < argc; i++) {
if (NULL != argv[i]) {
if (0 == strcmp(colName[i], "value_int")) {
int *int_tmp = (int *)malloc(sizeof(int));
*int_tmp = atoi(argv[i]);
out->value = (void *)int_tmp;
out->size = sizeof(int);
printf("SQLite3 found %s = %d\n", colName[i], int_tmp);
int *int_tmp = (int*)malloc(sizeof(int));
*int_tmp = atoi(argv[i]);
out->value = (void*)int_tmp;
out->size = sizeof(int);
/* printf("SQLite3 found %s = %d\n", colName[i], int_tmp); */
break;
}
else if (0 == strcmp(colName[i], "value_real")) {
float *float_tmp = (float *)malloc(sizeof(float));
*float_tmp = (float)atof(argv[i]);
out->value = (void *)float_tmp;
out->size = sizeof(float);
printf("SQLite3 found %s = %f\n", colName[i], float_tmp);
float *float_tmp = (float*)malloc(sizeof(float));
*float_tmp = (float)atof(argv[i]);
out->value = (void*)float_tmp;
out->size = sizeof(float);
/* printf("SQLite3 found %s = %f\n", colName[i], float_tmp); */
break;
}
else if (0 == strcmp(colName[i], "value_double")) {
double *double_tmp = (double *)malloc(sizeof(double));
*double_tmp = atof(argv[i]);
out->value = (void *)double_tmp;
out->size = sizeof(double);
printf("SQLite3 found %s = %f\n", colName[i], double_tmp);
double *double_tmp = (double*)malloc(sizeof(double));
*double_tmp = atof(argv[i]);
out->value = (void*)double_tmp;
out->size = sizeof(double);
/* printf("SQLite3 found %s = %f\n", colName[i], double_tmp); */
break;
}
else if (0 == strcmp(colName[i], "value_text")) {
Expand Down

0 comments on commit 8561288

Please sign in to comment.