Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 102695
Collapse All | Expand All

(-)file_not_specified_in_diff (-31 / +72 lines)
Line 1 Link Here
1
/* GKrellM Newsticker
1
/* GKellM Newsticker
2
--
Line 46 Link Here
46
static GMutex		*pollmutex = NULL;
47
static int		polls_left;
48
static GCond		*poll_finished = NULL;
Line 118 Link Here
118
	if (!strcmp(nt->label, tmp))
121
	if (nt->label && !strcmp(nt->label, tmp))
119
--
Line 129 Link Here
132
	    {
133
		char *tmp1 = tmp;
Line 130 Link Here
135
		g_free( tmp1 );
136
	    }
137
	    
138
	    char *tmp1;
139
	    tmp1 = create_new_label(tmp, list_to_search);
140
	    if( tmp1 != tmp )
141
	    {
142
		g_free( tmp );
143
		tmp = tmp1;
144
	    }		
Line 131 Link Here
131
	    tmp = create_new_label(tmp, list_to_search);
Line 192 Link Here
206
    if( !nt->headline )
207
	return 0;
208
Lines 214-215 Link Here
214
    xmlSubstituteEntitiesDefault(1);
215
Line 229 Link Here
244
	    {
245
	    	xmlFreeDoc(doc);
Line 230 Link Here
247
	    }
Line 278 Link Here
296
        xmlFreeDoc(doc);
Line 280 Link Here
280
Lines 291-292 Link Here
291
    GSList		*list;
292
    Newsticker		*nt2;
Line 294 Link Here
310
    /*g_mutex_lock( pollmutex );
311
    polls_left++;
312
    g_mutex_unlock( pollmutex );*/
Line 300 Link Here
300
	    if (strcmp(proxy_auth, "none"))
319
	    if (proxy_auth && strcmp(proxy_auth, "none"))
301
--
Line 303 Link Here
322
	// for threaded usage, set NOSIGNAL
323
	curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
Line 319 Link Here
340
    	    g_mutex_lock( pollmutex );
Line 320 Link Here
342
    	    g_mutex_unlock( pollmutex );
Lines 328-337 Link Here
328
    /* Checking whether end of list has been reached
351
    g_mutex_lock( pollmutex );
329
     * If that's the case, free (unlock) the mutex
352
    polls_left--;
330
     */
353
    g_mutex_unlock( pollmutex );
331
    list = g_slist_last(newsticker_list);
354
332
    nt2 = (Newsticker *) list->data;
355
    // Check if all have finished 
333
    if (!strcmp(nt2->label, nt->label))
356
    if ( polls_left <= 0 )
334
    {
357
    {
335
	g_mutex_unlock(mutex);
358
	// tell update_plugin that we are finished
336
	gkrellm_dup_string(&statpanel->label->string, "Unlocked");
359
	g_cond_signal( poll_finished );
337
	gkrellm_draw_panel_label(statpanel);
360
	
338
--
Line 369 Link Here
392
Line 375 Link Here
399
	    led_value[0] = 3;
400
	    polls_left = 0;
401
	    for (list = newsticker_list; list; list = list->next)
402
		polls_left++;
403
Line 380 Link Here
409
410
	    // wait till all polls have completed
411
	    g_cond_wait( poll_finished, mutex );
412
	    
413
	    gkrellm_dup_string(&statpanel->label->string, "Unlocked");
414
   	    gkrellm_draw_panel_label(statpanel);
415
	
416
	    g_mutex_unlock(mutex);
Line 472 Link Here
472
	    if ((ev->button == 1) && (strcmp(nt->link, "NULL")))
509
	    if ((ev->button == 1) && (nt->link && strcmp(nt->link, "NULL")))
473
--
Line 632 Link Here
669
Line 675 Link Here
713
714
	if( !label[0] )
715
		continue;
716
Line 1262 Link Here
1304
Line 1275 Link Here
1275
	    if (!strcmp(proxy, "none:0"))
1318
	    if (!proxy || !strcmp(proxy, "none:0"))
1276
--
Line 1332 Link Here
1332
	    g_free(converted_label);
1375
	    if( nt->label != converted_label )
1333
--
1376
		    g_free(converted_label);
Line 1440 Link Here
1440
    if ((use_proxy) && (strcmp(proxy, "none")) && (proxy))
1484
    if ((use_proxy) && proxy && (strcmp(proxy, "none")) )
1441
--
Line 1595 Link Here
1639
    xmlSubstituteEntitiesDefault(1);
1640
Line 1617 Link Here
1663
Line 1618 Link Here
1665
    pollmutex = g_mutex_new();
1666
    poll_finished = g_cond_new();

Return to bug 102695