1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

hotfix 1.0, author bug, use error macro. 1.0.9

This commit is contained in:
winlin 2014-11-27 18:48:01 +08:00
parent 575e50b6e2
commit 9c033c7da6
4 changed files with 16 additions and 12 deletions

View file

@ -42,7 +42,8 @@ int main(int argc, char** argv)
// srs debug info.
char srs_server_ip[128];
char srs_server[128];
char srs_primary_authors[128];
char srs_primary[128];
char srs_authors[128];
char srs_version[32];
int srs_id = 0;
int srs_pid = 0;
@ -59,7 +60,8 @@ int main(int argc, char** argv)
// set to zero.
srs_server_ip[0] = 0;
srs_server[0] = 0;
srs_primary_authors[0] = 0;
srs_primary[0] = 0;
srs_authors[0] = 0;
srs_version[0] = 0;
if (argc <= 1) {
@ -90,7 +92,7 @@ int main(int argc, char** argv)
printf("simple handshake success\n");
if ((ret = srs_connect_app2(rtmp,
srs_server_ip, srs_server, srs_primary_authors, srs_version, &srs_id, &srs_pid)) != 0) {
srs_server_ip, srs_server, srs_primary, srs_authors, srs_version, &srs_id, &srs_pid)) != 0) {
printf("connect vhost/app failed.\n");
goto rtmp_destroy;
}
@ -105,12 +107,12 @@ int main(int argc, char** argv)
}
printf("bandwidth check/test success\n");
printf("\n%s, %s\n"
printf("\n%s, %s, %s\n"
"%s, %s, srs_pid=%d, srs_id=%d\n"
"duration: %dms(%d+%d)\n"
"play: %dkbps\n"
"publish: %dkbps\n\n",
(char*)srs_server, (char*)srs_primary_authors,
(char*)srs_server, (char*)srs_primary, (char*)srs_authors,
(char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id,
(int)(end_time - start_time), play_duration, publish_duration,
play_kbps,
@ -123,7 +125,8 @@ rtmp_destroy:
fprintf(stderr, "{\"code\":%d,"
"\"srs_server\":\"%s\", "
"\"srs_primary_authors\":\"%s\", "
"\"srs_primary\":\"%s\", "
"\"srs_authors\":\"%s\", "
"\"srs_server_ip\":\"%s\", "
"\"srs_version\":\"%s\", "
"\"srs_pid\":%d, "
@ -134,7 +137,7 @@ rtmp_destroy:
"\"publish_kbps\":%d"
"}",
ret,
(char*)srs_server, (char*)srs_primary_authors,
(char*)srs_server, (char*)srs_primary, (char*)srs_authors,
(char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id,
(int)(end_time - start_time), play_duration, publish_duration,
play_kbps, publish_kbps);