Changeset 1893


Ignore:
Timestamp:
03/24/10 19:13:43 (13 years ago)
Author:
_network
Message:

fix cccam module flooding log on error after restart.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-cccam.c

    r1874 r1893  
    11281128  if (cc==NULL) {
    11291129    cs_log("cccam: cannot allocate memory");
    1130     return -1;
     1130    cs_exit(0);
    11311131  }
    11321132
     
    11621162    cc_crypt(&cc->block[DECRYPT], buf, 20, DECRYPT);
    11631163    cs_ddump(buf, 20, "cccam: hash:");
    1164   } else return -1;
     1164  } else {
     1165    cs_log("cccam:%d: receive failed errno: %d (%s)", __LINE__, errno, strerror(errno));
     1166    cs_exit(0);
     1167  }
    11651168
    11661169  // receive username
     
    11691172    cs_ddump(buf, 20, "cccam: username '%s':", buf);
    11701173    strncpy(usr, (char *)buf, sizeof(usr));
    1171   } else return -1;
     1174  } else {
     1175    cs_log("cccam:%d: receive username failed errno: %d (%s)", __LINE__, errno, strerror(errno));
     1176    cs_exit(0);
     1177  }
    11721178
    11731179  for (account=cfg->account; account; account=account->next)
     
    11821188    cc_crypt(&cc->block[DECRYPT], buf, 6, DECRYPT);
    11831189    cs_ddump(buf, 6, "cccam: pwd check '%s':", buf);
    1184   } else return -1;
     1190  } else {
     1191    cs_log("cccam:%d: receive passwd failed errno: %d (%s)", __LINE__, errno, strerror(errno));
     1192    cs_exit(0);
     1193  }
    11851194
    11861195  cs_auth_client(account, NULL);
     
    12041213  cc_cmd_send(NULL, 0, MSG_CLI_DATA);
    12051214
    1206   if (cc_send_srv_data()<0) return -1;
     1215  if (cc_send_srv_data()<0) {
     1216    cs_log("cccam:%d: cc_send_srv_data() failed errno: %d (%s)", __LINE__, errno, strerror(errno));
     1217    cs_exit(0);
     1218  }
    12071219
    12081220  is_server = 1;
     
    12441256  //cc_auth_client(client[cs_idx].ip);
    12451257  cc_srv_connect();
     1258
     1259 
     1260  cs_exit(0);
    12461261}
    12471262
Note: See TracChangeset for help on using the changeset viewer.