diff options
Diffstat (limited to 'src/plugins/fs/fs.c')
-rw-r--r-- | src/plugins/fs/fs.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index a0d1e227..37bae3fd 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -115,17 +115,6 @@ static void eventProcessor(void * cls, | |||
115 | (void*) event); | 115 | (void*) event); |
116 | } | 116 | } |
117 | 117 | ||
118 | static void * shutdownCode(Semaphore * sig) { | ||
119 | fs_download_stop(); | ||
120 | fs_search_stop(); | ||
121 | fs_collection_stop(); | ||
122 | fs_namespace_stop(); | ||
123 | fs_upload_stop(); | ||
124 | FSUI_stop(ctx); | ||
125 | SEMAPHORE_UP(sig); | ||
126 | return NULL; | ||
127 | } | ||
128 | |||
129 | void init_fs() { | 118 | void init_fs() { |
130 | GtkWidget * tab; | 119 | GtkWidget * tab; |
131 | GtkWidget * book; | 120 | GtkWidget * book; |
@@ -153,21 +142,12 @@ void init_fs() { | |||
153 | } | 142 | } |
154 | 143 | ||
155 | void done_fs() { | 144 | void done_fs() { |
156 | PTHREAD_T doneThread; | 145 | fs_download_stop(); |
157 | Semaphore * sig; | 146 | fs_search_stop(); |
158 | void * unused; | 147 | fs_collection_stop(); |
159 | 148 | fs_namespace_stop(); | |
160 | sig = SEMAPHORE_NEW(0); | 149 | fs_upload_stop(); |
161 | if (0 != PTHREAD_CREATE(&doneThread, | 150 | FSUI_stop(ctx); |
162 | (PThreadMain)&shutdownCode, | ||
163 | sig, | ||
164 | 64*1024)) | ||
165 | DIE_STRERROR("pthread_create"); | ||
166 | while (OK != SEMAPHORE_DOWN_NONBLOCKING(sig)) | ||
167 | gtkRunSomeSaveCalls(); | ||
168 | PTHREAD_JOIN(&doneThread, | ||
169 | &unused); | ||
170 | SEMAPHORE_FREE(sig); | ||
171 | } | 151 | } |
172 | 152 | ||
173 | /* end of fs.c */ | 153 | /* end of fs.c */ |