Project

General

Profile

Feature #4258 ยป tvheadend_add_adapter.patch

Joe User, 2017-03-02 13:39

View differences:

src/input/mpegts/linuxdvb/linuxdvb_adapter.c
278 278
#define MAX_DEV_OPEN_ATTEMPTS 20
279 279
  extern int linuxdvb_adapter_mask;
280 280
  int a, i, j, r, fd;
281
  char fe_path[512], dmx_path[512], dvr_path[512];
281
  char fe_path[512], dmx_path[512], dvr_path[512], name[132];
282 282
#if ENABLE_LINUXDVB_CA
283 283
  char ca_path[512];
284 284
  htsmsg_t *caconf = NULL;
......
338 338
      tvherror(LS_LINUXDVB, "unable to query %s", fe_path);
339 339
      continue;
340 340
    }
341
    snprintf(name, sizeof(name), "%s (A%i)",dfi.name, a);  
341 342
    type = linuxdvb_get_type(dfi.type);
342 343
    if (type == DVB_TYPE_NONE) {
343 344
      tvherror(LS_LINUXDVB, "unable to determine FE type %s - %i", fe_path, dfi.type);
......
360 361
    /* Create/Find adapter */
361 362
    pthread_mutex_lock(&global_lock);
362 363
    if (!la) {
363
      la = linuxdvb_adapter_new(path, a, dfi.name, &conf, &save);
364
      la = linuxdvb_adapter_new(path, a, name, &conf, &save);
364 365
      if (la == NULL) {
365 366
        tvherror(LS_LINUXDVB, "failed to create %s", path);
366 367
        return; // Note: save to return here as global_lock is held
......
391 392

392 393
      /* Create */
393 394
      linuxdvb_frontend_create(feconf, la, i, fe_path, dmx_path, dvr_path,
394
                               type5, dfi.name);
395
                               type5, name);
395 396
      fetypes[type5] = 1;
396 397
      fenum++;
397 398
    }
398 399
    if (fenum == 0)
399 400
      linuxdvb_frontend_create(feconf, la, i, fe_path, dmx_path, dvr_path,
400
                               type, dfi.name);
401
                               type, name);
401 402
#else
402
    linuxdvb_frontend_create(feconf, la, i, fe_path, dmx_path, dvr_path, type, dfi.name);
403
    linuxdvb_frontend_create(feconf, la, i, fe_path, dmx_path, dvr_path, type, name);
403 404
#endif
404 405
    pthread_mutex_unlock(&global_lock);
405 406
  }
    (1-1/1)