Changeset 1638


Ignore:
Timestamp:
02/21/10 09:12:13 (11 years ago)
Author:
landlord
Message:

module-cccam: sending a keepalive to the client instead of closing the connection, thanks to okmikel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-cccam.c

    r1632 r1638  
    11751175  cc_srv_report_cards();
    11761176
    1177   while ((i=process_input(mbuf, sizeof(mbuf), cfg->cmaxidle))>0);
     1177  // check for clienttimeout, if timeout occurs try to send keepalive
     1178  for(;;)
     1179  {
     1180    i=process_input(mbuf, sizeof(mbuf), cfg->cmaxidle);
     1181     
     1182    if (i == -9)
     1183    {
     1184      if (cc_cmd_send(NULL, 0, MSG_KEEPALIVE) > 0)
     1185      {
     1186        cs_debug("cccam: keepalive");
     1187        i = 0;
     1188      }
     1189    }
     1190     
     1191    if (i < 0)
     1192    {
     1193      break;
     1194    }
     1195  }
    11781196
    11791197  cs_disconnect_client();
Note: See TracChangeset for help on using the changeset viewer.