Changeset 5365


Ignore:
Timestamp:
Jun 7, 2011, 12:44:09 AM (8 years ago)
Author:
Admin
Message:

WebIf: Allow emptying au arameter. CCCam: Do not try to wake up reader if it is currently blocked or in shutdown so that pipe is not filled up by useless requests.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals.h

    r5362 r5365  
    1 #define _GNU_SOURCE //prevents "implicit" warning for asprintf
     1#define _GNU_SOURCE //needed for PTHREAD_MUTEX_RECURSIVE on some plattforms and maybe other things; do not remove
    22#include <stdlib.h>
    33#include <stdio.h>
  • trunk/module-cccam.c

    r5352 r5365  
    26082608    int32_t wakeup = 0;
    26092609    struct s_reader *rdr;
     2610    struct s_client *client;
     2611    struct cc_data *cc;
    26102612    for (rdr = first_active_reader; rdr; rdr = rdr->next) {
    26112613        if (rdr->typ != R_CCCAM)
     
    26162618            continue;
    26172619        if (rdr->cc_keepalive) //if reader has keepalive but is NOT connected, reader can't connect. so don't ask him
     2620            continue;
     2621        if((client = rdr->client) == NULL || (cc = client->cc) == NULL || cc->mode == CCCAM_MODE_SHUTDOWN)  //reader is in shutdown
     2622            continue;
     2623        if(is_connect_blocked(rdr)) //reader cannot be waked up currently because its blocked
    26182624            continue;
    26192625       
     
    29392945    if (!cl->udp_fd) {
    29402946        cc_cli_init_int(cl);
    2941         return -1; // cc_cli_init_int32_t calls cc_cli_connect, so exit here!
     2947        return -1; // cc_cli_init_int calls cc_cli_connect, so exit here!
    29422948    }
    29432949       
  • trunk/module-lcd.c

    r5362 r5365  
    1313#include <sys/stat.h>
    1414#include <dirent.h>
    15 #include "global-functions.h"
    1615
    1716#ifdef MODULE_CCCAM
  • trunk/oscam-config.c

    r5355 r5365  
    17651765        account->autoau = 0;
    17661766
     1767        if (!account->aureader_list)
     1768            account->aureader_list = ll_create();
     1769
     1770        if(value && value[0] == '1') {
     1771            account->autoau = 1;
     1772        }
     1773        ll_clear(account->aureader_list);
     1774       
    17671775        // exit if invalid or no value
    17681776        if ((strlen(value) == 0) || (value[0] == '0'))
    17691777            return;
    1770 
     1778           
     1779        LL_ITER itr = ll_iter_create(configured_readers);       
    17711780        struct s_reader *rdr;
    17721781        char *pch;
    1773         if (!account->aureader_list)
    1774             account->aureader_list = ll_create();
    1775 
    1776         if(value && value[0] == '1') {
    1777             account->autoau = 1;
    1778         }
    1779         LL_ITER itr = ll_iter_create(configured_readers);
    1780         ll_clear(account->aureader_list);
    17811782
    17821783        for (pch = strtok_r(value, ",", &saveptr1); pch != NULL; pch = strtok_r(NULL, ",", &saveptr1)) {
Note: See TracChangeset for help on using the changeset viewer.