close files after reading them
This commit is contained in:
@@ -85,6 +85,7 @@ void * GetArtistInfo(void *ptr)
|
|||||||
string line;
|
string line;
|
||||||
while (getline(input, line))
|
while (getline(input, line))
|
||||||
*result += line + "\n";
|
*result += line + "\n";
|
||||||
|
input.close();
|
||||||
*result = result->substr(0, result->length()-1);
|
*result = result->substr(0, result->length()-1);
|
||||||
data_ready = 1;
|
data_ready = 1;
|
||||||
pthread_exit(result);
|
pthread_exit(result);
|
||||||
@@ -227,6 +228,7 @@ void * GetLyrics(void *song)
|
|||||||
string line;
|
string line;
|
||||||
while (getline(input, line))
|
while (getline(input, line))
|
||||||
*result += line + "\n";
|
*result += line + "\n";
|
||||||
|
input.close();
|
||||||
*result = result->substr(0, result->length()-1);
|
*result = result->substr(0, result->length()-1);
|
||||||
# ifdef HAVE_CURL_CURL_H
|
# ifdef HAVE_CURL_CURL_H
|
||||||
data_ready = 1;
|
data_ready = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user