Changeset 8461


Ignore:
Timestamp:
03/03/13 20:00:55 (8 years ago)
Author:
TNe-TWo
Message:

workaround to prevent rare segfault on free_client
http://www.streamboard.tv/wbb2/thread.php?threadid=37372

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals.h

    r8456 r8461  
    894894    int8_t          thread_active;
    895895    int8_t          kill;
     896    int8_t          kill_started;
    896897    LLIST           *joblist;
    897898    IN_ADDR_T       ip;
  • trunk/oscam-client.c

    r8455 r8461  
    557557    struct s_client *prev, *cl2;
    558558    cs_writelock(&clientlist_lock);
     559    if (!cl->kill_started) {
     560        cl->kill_started = 1;
     561    } else{
     562        cs_writeunlock(&clientlist_lock);
     563        cs_log("[free_client] ERROR: free already started!");
     564        return;
     565    }
    559566    cl->kill = 1;
    560567    for (prev = first_client, cl2 = first_client->next;
Note: See TracChangeset for help on using the changeset viewer.