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>
|
||||
|
||||
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.Zero[0] = 0; Server.Zero[1] = 0; Server.Zero[2] = 0; Server.Zero[3] = 0;
|
||||
for (int i = 0; i < 1528; i++){
|
||||
Server.Random[i] = versionstring[i%13];
|
||||
Server.Random[i] = versionstring[i%sizeof(versionstring)];
|
||||
}
|
||||
/** Send S0 **/
|
||||
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)){
|
||||
rec_window_at = rec_cnt;
|
||||
SendCTL(3, rec_cnt);//send ack (msg 3)
|
||||
lastcheck = getNowMS();
|
||||
}
|
||||
}
|
||||
close(CONN_fd);
|
||||
if (inited) close(ss);
|
||||
#if DEBUG >= 1
|
||||
if (All_Hell_Broke_Loose){fprintf(stderr, "All Hell Broke Loose\n");}
|
||||
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
|
||||
return 0;
|
||||
}//main
|
||||
|
|
Loading…
Add table
Reference in a new issue