Browse Source

Mark code word error messages as such.

Georgi Chorbadzhiyski 12 years ago
parent
commit
8830dee404
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      camd.c

+ 5
- 5
camd.c View File

@@ -125,7 +125,7 @@ static int camd35_recv_cw(struct ts *ts) {
125 125
 READ:
126 126
 	ret = camd35_recv(c, data, &data_len);
127 127
 	if (ret < 0) {
128
-		ts_LOGf("CW  | No CW has been received (ret = %d)\n", ret);
128
+		ts_LOGf("ERR | No code word has been received (ret = %d)\n", ret);
129 129
 		camd35_reconnect(ts);
130 130
 		return ret;
131 131
 	}
@@ -135,10 +135,10 @@ READ:
135 135
 		goto READ;
136 136
 
137 137
 	if (data[0] != 0x01) {
138
-		ts_LOGf("CW  | Unexpected server response (returned data[0] == 0x%02x /ERR: %s/)\n",
138
+		ts_LOGf("ERR | Unexpected server response on code word request (ret data[0] == 0x%02x /%s/)\n",
139 139
 			data[0],
140 140
 			data[0] == 0x08 ? "No card" :
141
-			data[0] == 0x44 ? "No code word found" : "Unknown");
141
+			data[0] == 0x44 ? "No code word found" : "Unknown err");
142 142
 		c->ecm_recv_errors++;
143 143
 		if (c->ecm_recv_errors >= ECM_RECV_ERRORS_LIMIT) {
144 144
 			c->key->is_valid_cw = 0;
@@ -148,12 +148,12 @@ READ:
148 148
 	}
149 149
 
150 150
 	if (data_len < 48) {
151
-		ts_LOGf("CW  | data_len (%d) mismatch != 48\n", data_len);
151
+		ts_LOGf("ERR | Code word data_len (%d) mismatch != 48\n", data_len);
152 152
 		return 0;
153 153
 	}
154 154
 
155 155
 	if (data[1] < 0x10) {
156
-		ts_LOGf("CW  | CW len (%d) mismatch != 16\n", data[1]);
156
+		ts_LOGf("ERR | Code word len (%d) mismatch != 16\n", data[1]);
157 157
 		return 0;
158 158
 	}
159 159
 	gettimeofday(&tv2, NULL);

Loading…
Cancel
Save