summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2016-02-26 20:52:32 -0500
committerzmike <michael.blumenkrantz@gmail.com>2016-02-26 20:53:14 -0500
commitbd77f49f3c8eebffef3ee086a5abcfb038fe6d3c (patch)
tree234f55f044b4c81f59bb53a476064354eea402dc /src
parent39bc858b20ca0a0ba2c1427ce64d57163b819dd2 (diff)
remove broken list variable aliasing during apm update processing
ref 2e101a73d501a1e11bc20d6e636872deef0d74b3
Diffstat (limited to 'src')
-rw-r--r--src/modules/auto_playlist_manager.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/modules/auto_playlist_manager.c b/src/modules/auto_playlist_manager.c
index 4c10587..152bc10 100644
--- a/src/modules/auto_playlist_manager.c
+++ b/src/modules/auto_playlist_manager.c
@@ -202,7 +202,6 @@ static void
202run_adds(void) 202run_adds(void)
203{ 203{
204 char *file; 204 char *file;
205 Eina_List *l;
206 205
207 last_queue_length = empd_queue_length; 206 last_queue_length = empd_queue_length;
208 while (adds) 207 while (adds)
@@ -213,8 +212,7 @@ run_adds(void)
213 Elm_Object_Item *item; 212 Elm_Object_Item *item;
214 Eina_Bool done = EINA_FALSE; 213 Eina_Bool done = EINA_FALSE;
215 214
216 l = eina_list_data_get(adds); 215 file = eina_list_data_get(adds);
217 file = eina_list_data_get(l);
218 a = strrchr(file, '/'); 216 a = strrchr(file, '/');
219 if (a) 217 if (a)
220 b = strchr(file, '/'); 218 b = strchr(file, '/');
@@ -227,7 +225,7 @@ run_adds(void)
227 if (a == b) 225 if (a == b)
228 { 226 {
229 empd_empdd_list_info_call(empd_proxy, info_cb, file, file); 227 empd_empdd_list_info_call(empd_proxy, info_cb, file, file);
230 adds = eina_list_remove_list(adds, l); 228 adds = eina_list_remove_list(adds, adds);
231 return; 229 return;
232 } 230 }
233 231
@@ -264,16 +262,16 @@ run_adds(void)
264 post_add(1, file); 262 post_add(1, file);
265 empd_empdd_add_id_list_call(empd_proxy, file, ss->song_pos + 1); 263 empd_empdd_add_id_list_call(empd_proxy, file, ss->song_pos + 1);
266 done = EINA_TRUE; 264 done = EINA_TRUE;
267 while (eina_list_next(l)) 265 while (eina_list_next(adds))
268 { 266 {
269 char *f2; 267 char *f2;
270 268
271 pos++; 269 pos++;
272 f2 = eina_list_data_get(eina_list_next(l)); 270 f2 = eina_list_data_get(eina_list_next(adds));
273 if (!is_same_path(file, a, f2, NULL)) break; 271 if (!is_same_path(file, a, f2, NULL)) break;
274 empd_empdd_add_id_list_call(empd_proxy, file, ss->song_pos + pos); 272 empd_empdd_add_id_list_call(empd_proxy, file, ss->song_pos + pos);
275 post_add(1, f2); 273 post_add(1, f2);
276 adds = eina_list_remove_list(adds, eina_list_next(l)); 274 adds = eina_list_remove_list(adds, eina_list_next(adds));
277 free(f2); 275 free(f2);
278 } 276 }
279 break; 277 break;
@@ -288,17 +286,17 @@ run_adds(void)
288 /* sequentially append all songs from matching directory structure */ 286 /* sequentially append all songs from matching directory structure */
289 empd_empdd_add_list_call(empd_proxy, file); 287 empd_empdd_add_list_call(empd_proxy, file);
290 post_add(0, file); 288 post_add(0, file);
291 while (eina_list_next(l)) 289 while (eina_list_next(adds))
292 { 290 {
293 f2 = eina_list_data_get(eina_list_next(l)); 291 f2 = eina_list_data_get(eina_list_next(adds));
294 if (!is_same_path(file, a, f2, NULL)) break; 292 if (!is_same_path(file, a, f2, NULL)) break;
295 empd_empdd_add_list_call(empd_proxy, f2); 293 empd_empdd_add_list_call(empd_proxy, f2);
296 post_add(0, f2); 294 post_add(0, f2);
297 adds = eina_list_remove_list(adds, eina_list_next(l)); 295 adds = eina_list_remove_list(adds, eina_list_next(adds));
298 free(f2); 296 free(f2);
299 } 297 }
300 } 298 }
301 adds = eina_list_remove_list(adds, l); 299 adds = eina_list_remove_list(adds, adds);
302 free(file); 300 free(file);
303 } 301 }
304} 302}