diff --git a/src/distroquery.c b/src/distroquery.c index 79e0130..5fe3dc7 100644 --- a/src/distroquery.c +++ b/src/distroquery.c @@ -315,15 +315,14 @@ void printQueryData() { if (sqlite3_prepare_v2((sqlite3*)query_repositories[i]->db[ARCHS_MAX], sql, strlen(sql), &stmt1, NULL) == SQLITE_OK) { sqlite3_step(stmt1); get_favicon_from_url(sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX); - } else buffer[0]='\0'; - - printf("
%s", simpleTimeToHuman(sqlite3_column_int(stmt1,sqlite3_find_column_id(stmt1, NULL, "time")), (humanDate *) & strdate), @@ -746,14 +768,17 @@ void printSourcePackageData() { sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "release")), sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "text"))); } - - + sqlite3_finalize(stmt1); + } } + snprintf(buffer, PATH_MAX, "%s - %s", + sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")), + sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "summary"))); + sqlite3_finalize(statement); } printf("]]>"); - printf("