winlin

hotfix 1.0, author bug, use error macro. 1.0.9

@@ -42,7 +42,8 @@ int main(int argc, char** argv) @@ -42,7 +42,8 @@ int main(int argc, char** argv)
42 // srs debug info. 42 // srs debug info.
43 char srs_server_ip[128]; 43 char srs_server_ip[128];
44 char srs_server[128]; 44 char srs_server[128];
45 - char srs_primary_authors[128]; 45 + char srs_primary[128];
  46 + char srs_authors[128];
46 char srs_version[32]; 47 char srs_version[32];
47 int srs_id = 0; 48 int srs_id = 0;
48 int srs_pid = 0; 49 int srs_pid = 0;
@@ -59,7 +60,8 @@ int main(int argc, char** argv) @@ -59,7 +60,8 @@ int main(int argc, char** argv)
59 // set to zero. 60 // set to zero.
60 srs_server_ip[0] = 0; 61 srs_server_ip[0] = 0;
61 srs_server[0] = 0; 62 srs_server[0] = 0;
62 - srs_primary_authors[0] = 0; 63 + srs_primary[0] = 0;
  64 + srs_authors[0] = 0;
63 srs_version[0] = 0; 65 srs_version[0] = 0;
64 66
65 if (argc <= 1) { 67 if (argc <= 1) {
@@ -90,7 +92,7 @@ int main(int argc, char** argv) @@ -90,7 +92,7 @@ int main(int argc, char** argv)
90 printf("simple handshake success\n"); 92 printf("simple handshake success\n");
91 93
92 if ((ret = srs_connect_app2(rtmp, 94 if ((ret = srs_connect_app2(rtmp,
93 - srs_server_ip, srs_server, srs_primary_authors, srs_version, &srs_id, &srs_pid)) != 0) { 95 + srs_server_ip, srs_server, srs_primary, srs_authors, srs_version, &srs_id, &srs_pid)) != 0) {
94 printf("connect vhost/app failed.\n"); 96 printf("connect vhost/app failed.\n");
95 goto rtmp_destroy; 97 goto rtmp_destroy;
96 } 98 }
@@ -105,12 +107,12 @@ int main(int argc, char** argv) @@ -105,12 +107,12 @@ int main(int argc, char** argv)
105 } 107 }
106 printf("bandwidth check/test success\n"); 108 printf("bandwidth check/test success\n");
107 109
108 - printf("\n%s, %s\n" 110 + printf("\n%s, %s, %s\n"
109 "%s, %s, srs_pid=%d, srs_id=%d\n" 111 "%s, %s, srs_pid=%d, srs_id=%d\n"
110 "duration: %dms(%d+%d)\n" 112 "duration: %dms(%d+%d)\n"
111 "play: %dkbps\n" 113 "play: %dkbps\n"
112 "publish: %dkbps\n\n", 114 "publish: %dkbps\n\n",
113 - (char*)srs_server, (char*)srs_primary_authors, 115 + (char*)srs_server, (char*)srs_primary, (char*)srs_authors,
114 (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id, 116 (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id,
115 (int)(end_time - start_time), play_duration, publish_duration, 117 (int)(end_time - start_time), play_duration, publish_duration,
116 play_kbps, 118 play_kbps,
@@ -123,7 +125,8 @@ rtmp_destroy: @@ -123,7 +125,8 @@ rtmp_destroy:
123 125
124 fprintf(stderr, "{\"code\":%d," 126 fprintf(stderr, "{\"code\":%d,"
125 "\"srs_server\":\"%s\", " 127 "\"srs_server\":\"%s\", "
126 - "\"srs_primary_authors\":\"%s\", " 128 + "\"srs_primary\":\"%s\", "
  129 + "\"srs_authors\":\"%s\", "
127 "\"srs_server_ip\":\"%s\", " 130 "\"srs_server_ip\":\"%s\", "
128 "\"srs_version\":\"%s\", " 131 "\"srs_version\":\"%s\", "
129 "\"srs_pid\":%d, " 132 "\"srs_pid\":%d, "
@@ -134,7 +137,7 @@ rtmp_destroy: @@ -134,7 +137,7 @@ rtmp_destroy:
134 "\"publish_kbps\":%d" 137 "\"publish_kbps\":%d"
135 "}", 138 "}",
136 ret, 139 ret,
137 - (char*)srs_server, (char*)srs_primary_authors, 140 + (char*)srs_server, (char*)srs_primary, (char*)srs_authors,
138 (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id, 141 (char*)srs_server_ip, (char*)srs_version, srs_pid, srs_id,
139 (int)(end_time - start_time), play_duration, publish_duration, 142 (int)(end_time - start_time), play_duration, publish_duration,
140 play_kbps, publish_kbps); 143 play_kbps, publish_kbps);
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR 1 32 #define VERSION_MAJOR 1
33 #define VERSION_MINOR 0 33 #define VERSION_MINOR 0
34 -#define VERSION_REVISION 8 34 +#define VERSION_REVISION 9
35 // server info. 35 // server info.
36 #define RTMP_SIG_SRS_KEY "SRS" 36 #define RTMP_SIG_SRS_KEY "SRS"
37 #define RTMP_SIG_SRS_ROLE "origin/edge server" 37 #define RTMP_SIG_SRS_ROLE "origin/edge server"
@@ -158,12 +158,12 @@ int main(int argc, char** argv) @@ -158,12 +158,12 @@ int main(int argc, char** argv)
158 ProfilerStart("gperf.srs.gcp"); 158 ProfilerStart("gperf.srs.gcp");
159 #endif 159 #endif
160 160
  161 + // directly compile error when these two macro defines.
161 #if defined(SRS_AUTO_GPERF_MC) && defined(SRS_AUTO_GPERF_MP) 162 #if defined(SRS_AUTO_GPERF_MC) && defined(SRS_AUTO_GPERF_MP)
162 - srs_error("option --with-gmc confict with --with-gmp, " 163 + #error ("option --with-gmc confict with --with-gmp, "
163 "@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n" 164 "@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n"
164 "Note that since the heap-checker uses the heap-profiling framework internally, " 165 "Note that since the heap-checker uses the heap-profiling framework internally, "
165 "it is not possible to run both the heap-checker and heap profiler at the same time"); 166 "it is not possible to run both the heap-checker and heap profiler at the same time");
166 - return -1;  
167 #endif 167 #endif
168 168
169 // never use srs log(srs_trace, srs_error, etc) before config parse the option, 169 // never use srs log(srs_trace, srs_error, etc) before config parse the option,
@@ -435,13 +435,14 @@ int SrsRtmpClient::connect_app(string app, string tc_url, @@ -435,13 +435,14 @@ int SrsRtmpClient::connect_app(string app, string tc_url,
435 { 435 {
436 std::string srs_server_ip; 436 std::string srs_server_ip;
437 std::string srs_server; 437 std::string srs_server;
438 - std::string srs_primary_authors; 438 + std::string srs_primary;
  439 + std::string srs_authors;
439 std::string srs_version; 440 std::string srs_version;
440 int srs_id = 0; 441 int srs_id = 0;
441 int srs_pid = 0; 442 int srs_pid = 0;
442 443
443 return connect_app2(app, tc_url, req, debug_srs_upnode, 444 return connect_app2(app, tc_url, req, debug_srs_upnode,
444 - srs_server_ip, srs_server, srs_primary_authors, 445 + srs_server_ip, srs_server, srs_primary, srs_authors,
445 srs_version, srs_id, srs_pid); 446 srs_version, srs_id, srs_pid);
446 } 447 }
447 448