Changeset 11209


Ignore:
Timestamp:
01/10/16 13:34:22 (8 years ago)
Author:
manio
Message:

Fix setting client_proto_version for the connection

The client_proto_version was lost when the PMT data was not send in the very first data packet processed.

The trace for the problem:

  • new socket connection fd: 14
  • dvbapi_handlesockdata, client_proto_ver=0, pfd2[i]: i=0
  • Got DVBAPI_CLIENT_INFO packet with size 42
  • Client connected: 'vdr-plugin-dvbapi 2.2.1 / VDR 2.0.0' (protocol version = 2)
  • dvbapi_handlesockdata AFTER, client_proto_ver=2, pfd2[i]: i=0


Now the connection is added to unassoc_fd, because there was only a greeting and no caPMT.
Then the PMT update is on other pfd2 index (i=1) and the client_proto was set previously on index i=0 !

  • dvbapi_handlesockdata, client_proto_ver=0, pfd2[i]: i=1


And OSCam was using wrong protocol leading to problems with communication.

The commit uses the last_client_proto in this case to correctly fill the client_proto_version[] table with correct index.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-dvbapi.c

    r11207 r11209  
    52285228                pfd2[pfdcount].fd = unassoc_fd[i];
    52295229                pfd2[pfdcount].events = (POLLIN | POLLPRI);
     5230                client_proto_version[pfdcount] = last_client_proto_version;
    52305231                type[pfdcount++] = 1;
    52315232            }
Note: See TracChangeset for help on using the changeset viewer.