Debugging RTMP connector, compile warning in Buffer fixed
This commit is contained in:
parent
d6f6d21af1
commit
eaa1c7c26f
3 changed files with 16 additions and 2 deletions
|
@ -13,7 +13,10 @@
|
||||||
#include <sys/epoll.h>
|
#include <sys/epoll.h>
|
||||||
|
|
||||||
void termination_handler (int signum){
|
void termination_handler (int signum){
|
||||||
return;
|
switch (signum){
|
||||||
|
case SIGPIPE: return; break;
|
||||||
|
default: return; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ bool doHandshake(){
|
||||||
Server.Time[0] = 0; Server.Time[1] = 0; Server.Time[2] = 0; Server.Time[3] = 0;
|
Server.Time[0] = 0; Server.Time[1] = 0; Server.Time[2] = 0; Server.Time[3] = 0;
|
||||||
Server.Zero[0] = 0; Server.Zero[1] = 0; Server.Zero[2] = 0; Server.Zero[3] = 0;
|
Server.Zero[0] = 0; Server.Zero[1] = 0; Server.Zero[2] = 0; Server.Zero[3] = 0;
|
||||||
for (int i = 0; i < 1528; i++){
|
for (int i = 0; i < 1528; i++){
|
||||||
Server.Random[i] = versionstring[i%13];
|
Server.Random[i] = versionstring[i%sizeof(versionstring)];
|
||||||
}
|
}
|
||||||
/** Send S0 **/
|
/** Send S0 **/
|
||||||
DDV_write(&(Version), 1, 1, CONN_fd);
|
DDV_write(&(Version), 1, 1, CONN_fd);
|
||||||
|
|
|
@ -225,12 +225,23 @@ int main(int argc, char ** argv){
|
||||||
if ((rec_cnt - rec_window_at > rec_window_size) || (getNowMS() - lastcheck > 1)){
|
if ((rec_cnt - rec_window_at > rec_window_size) || (getNowMS() - lastcheck > 1)){
|
||||||
rec_window_at = rec_cnt;
|
rec_window_at = rec_cnt;
|
||||||
SendCTL(3, rec_cnt);//send ack (msg 3)
|
SendCTL(3, rec_cnt);//send ack (msg 3)
|
||||||
|
lastcheck = getNowMS();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(CONN_fd);
|
close(CONN_fd);
|
||||||
|
if (inited) close(ss);
|
||||||
#if DEBUG >= 1
|
#if DEBUG >= 1
|
||||||
if (All_Hell_Broke_Loose){fprintf(stderr, "All Hell Broke Loose\n");}
|
if (All_Hell_Broke_Loose){fprintf(stderr, "All Hell Broke Loose\n");}
|
||||||
fprintf(stderr, "User %i disconnected.\n", CONN_fd);
|
fprintf(stderr, "User %i disconnected.\n", CONN_fd);
|
||||||
|
if (inited){
|
||||||
|
fprintf(stderr, "Status was: inited\n");
|
||||||
|
}else{
|
||||||
|
if (ready4data){
|
||||||
|
fprintf(stderr, "Status was: ready4data\n");
|
||||||
|
}else{
|
||||||
|
fprintf(stderr, "Status was: connected\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}//main
|
}//main
|
||||||
|
|
Loading…
Add table
Reference in a new issue