winlin

remove the dead code for bug #180

@@ -1263,17 +1263,12 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs @@ -1263,17 +1263,12 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
1263 { 1263 {
1264 int ret = ERROR_SUCCESS; 1264 int ret = ERROR_SUCCESS;
1265 1265
1266 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1267 - SrsHandshakeBytes* ptr = hs_bytes;  
1268 -  
1269 ssize_t nsize; 1266 ssize_t nsize;
1270 1267
1271 // complex handshake 1268 // complex handshake
1272 if ((ret = hs_bytes->create_c0c1()) != ERROR_SUCCESS) { 1269 if ((ret = hs_bytes->create_c0c1()) != ERROR_SUCCESS) {
1273 return ret; 1270 return ret;
1274 } 1271 }
1275 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1276 - srs_assert(ptr == hs_bytes);  
1277 1272
1278 // sign c1 1273 // sign c1
1279 c1s1 c1; 1274 c1s1 c1;
@@ -1282,8 +1277,6 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs @@ -1282,8 +1277,6 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
1282 return ret; 1277 return ret;
1283 } 1278 }
1284 c1.dump(hs_bytes->c0c1 + 1); 1279 c1.dump(hs_bytes->c0c1 + 1);
1285 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1286 - srs_assert(ptr == hs_bytes);  
1287 1280
1288 // verify c1 1281 // verify c1
1289 bool is_valid; 1282 bool is_valid;
@@ -1291,23 +1284,17 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs @@ -1291,23 +1284,17 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
1291 ret = ERROR_RTMP_TRY_SIMPLE_HS; 1284 ret = ERROR_RTMP_TRY_SIMPLE_HS;
1292 return ret; 1285 return ret;
1293 } 1286 }
1294 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1295 - srs_assert(ptr == hs_bytes);  
1296 1287
1297 if ((ret = io->write(hs_bytes->c0c1, 1537, &nsize)) != ERROR_SUCCESS) { 1288 if ((ret = io->write(hs_bytes->c0c1, 1537, &nsize)) != ERROR_SUCCESS) {
1298 srs_warn("write c0c1 failed. ret=%d", ret); 1289 srs_warn("write c0c1 failed. ret=%d", ret);
1299 return ret; 1290 return ret;
1300 } 1291 }
1301 srs_verbose("write c0c1 success."); 1292 srs_verbose("write c0c1 success.");
1302 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1303 - srs_assert(ptr == hs_bytes);  
1304 1293
1305 // s0s1s2 1294 // s0s1s2
1306 if ((ret = hs_bytes->read_s0s1s2(io)) != ERROR_SUCCESS) { 1295 if ((ret = hs_bytes->read_s0s1s2(io)) != ERROR_SUCCESS) {
1307 return ret; 1296 return ret;
1308 } 1297 }
1309 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1310 - srs_assert(ptr == hs_bytes);  
1311 1298
1312 // plain text required. 1299 // plain text required.
1313 if (hs_bytes->s0s1s2[0] != 0x03) { 1300 if (hs_bytes->s0s1s2[0] != 0x03) {
@@ -1315,16 +1302,12 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs @@ -1315,16 +1302,12 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
1315 srs_warn("handshake failed, plain text required. ret=%d", ret); 1302 srs_warn("handshake failed, plain text required. ret=%d", ret);
1316 return ret; 1303 return ret;
1317 } 1304 }
1318 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1319 - srs_assert(ptr == hs_bytes);  
1320 1305
1321 // verify s1s2 1306 // verify s1s2
1322 c1s1 s1; 1307 c1s1 s1;
1323 if ((ret = s1.parse(hs_bytes->s0s1s2 + 1, c1.schema)) != ERROR_SUCCESS) { 1308 if ((ret = s1.parse(hs_bytes->s0s1s2 + 1, c1.schema)) != ERROR_SUCCESS) {
1324 return ret; 1309 return ret;
1325 } 1310 }
1326 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1327 - srs_assert(ptr == hs_bytes);  
1328 1311
1329 // never verify the s1, 1312 // never verify the s1,
1330 // for if forward to nginx-rtmp, verify s1 will failed, 1313 // for if forward to nginx-rtmp, verify s1 will failed,
@@ -1334,15 +1317,11 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs @@ -1334,15 +1317,11 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
1334 if ((ret = hs_bytes->create_c2()) != ERROR_SUCCESS) { 1317 if ((ret = hs_bytes->create_c2()) != ERROR_SUCCESS) {
1335 return ret; 1318 return ret;
1336 } 1319 }
1337 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1338 - srs_assert(ptr == hs_bytes);  
1339 1320
1340 c2s2 c2; 1321 c2s2 c2;
1341 if ((ret = c2.c2_create(&s1)) != ERROR_SUCCESS) { 1322 if ((ret = c2.c2_create(&s1)) != ERROR_SUCCESS) {
1342 return ret; 1323 return ret;
1343 } 1324 }
1344 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1345 - srs_assert(ptr == hs_bytes);  
1346 1325
1347 c2.dump(hs_bytes->c2); 1326 c2.dump(hs_bytes->c2);
1348 if ((ret = io->write(hs_bytes->c2, 1536, &nsize)) != ERROR_SUCCESS) { 1327 if ((ret = io->write(hs_bytes->c2, 1536, &nsize)) != ERROR_SUCCESS) {
@@ -1350,8 +1329,6 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs @@ -1350,8 +1329,6 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
1350 return ret; 1329 return ret;
1351 } 1330 }
1352 srs_verbose("complex handshake write c2 success."); 1331 srs_verbose("complex handshake write c2 success.");
1353 - // TODO: FIXME: check memory corrupt, for https://github.com/winlinvip/simple-rtmp-server/issues/180  
1354 - srs_assert(ptr == hs_bytes);  
1355 1332
1356 srs_trace("complex handshake success."); 1333 srs_trace("complex handshake success.");
1357 1334