Skip to content

Commit a4e1ada

Browse files
mattmundellgreenbonebot
authored andcommitted
Change: remove task file iterator
This was used by the OTP scan handling (run_otp_task/get_files_to_send). Removed in ab2a187 and 08efe63.
1 parent 17c6f56 commit a4e1ada

File tree

2 files changed

+0
-58
lines changed

2 files changed

+0
-58
lines changed

src/manage_sql.c

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19881,55 +19881,6 @@ manage_task_remove_file (const gchar *task_id, const char *name)
1988119881
return -1;
1988219882
}
1988319883

19884-
19885-
/**
19886-
* @brief Initialise a task file iterator.
19887-
*
19888-
* @param[in] iterator Iterator.
19889-
* @param[in] task Task.
19890-
* @param[in] file File name, NULL for all files.
19891-
*/
19892-
void
19893-
init_task_file_iterator (iterator_t* iterator, task_t task, const char* file)
19894-
{
19895-
gchar* sql;
19896-
if (file)
19897-
{
19898-
gchar *quoted_file = sql_nquote (file, strlen (file));
19899-
sql = g_strdup_printf ("SELECT name, content, length(content)"
19900-
" FROM task_files"
19901-
" WHERE task = %llu"
19902-
" AND name = '%s';",
19903-
task, quoted_file);
19904-
g_free (quoted_file);
19905-
}
19906-
else
19907-
sql = g_strdup_printf ("SELECT name, content, length(content)"
19908-
" FROM task_files"
19909-
" WHERE task = %llu;",
19910-
task);
19911-
init_iterator (iterator, "%s", sql);
19912-
g_free (sql);
19913-
}
19914-
19915-
/**
19916-
* @brief Get the name of the file from a task file iterator.
19917-
*
19918-
* @param[in] iterator Iterator.
19919-
*
19920-
* @return Name of the file or NULL if iteration is complete.
19921-
*/
19922-
DEF_ACCESS (task_file_iterator_name, 0);
19923-
19924-
/**
19925-
* @brief Get the content of the file from a task file iterator.
19926-
*
19927-
* @param[in] iterator Iterator.
19928-
*
19929-
* @return Content of the file or NULL if iteration is complete.
19930-
*/
19931-
DEF_ACCESS (task_file_iterator_content, 1);
19932-
1993319884
/**
1993419885
* @brief Modify a task.
1993519886
*

src/manage_sql.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,6 @@ update_report_modification_time (report_t);
225225
int
226226
set_report_slave_progress (report_t, int);
227227

228-
void
229-
init_task_file_iterator (iterator_t *, task_t, const char *);
230-
231-
const char *
232-
task_file_iterator_name (iterator_t *);
233-
234-
const char *
235-
task_file_iterator_content (iterator_t *);
236-
237228
void
238229
set_task_schedule_next_time (task_t, time_t);
239230

0 commit comments

Comments
 (0)