[svn-commits] phsultan: branch phsultan/rtmp-support r206806 - /team/phsultan/rtmp-support/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 16 10:43:32 CDT 2009


Author: phsultan
Date: Thu Jul 16 10:43:28 2009
New Revision: 206806

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=206806
Log:
Fixed some compile warnings on a 64 bits computer

Modified:
    team/phsultan/rtmp-support/channels/chan_rtmp.c

Modified: team/phsultan/rtmp-support/channels/chan_rtmp.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/phsultan/rtmp-support/channels/chan_rtmp.c?view=diff&rev=206806&r1=206805&r2=206806
==============================================================================
--- team/phsultan/rtmp-support/channels/chan_rtmp.c (original)
+++ team/phsultan/rtmp-support/channels/chan_rtmp.c Thu Jul 16 10:43:28 2009
@@ -965,7 +965,7 @@
 
 	if (!memcmp(handshake, buffer, 2*RTMP_BLOCK_SIZE)) {
 		/* skip last byte because its value is not always the same! */
-		ast_debug(3, "Handshake test passed, buffer size = %d\n", size);
+		ast_debug(3, "Handshake test passed, buffer size = %d\n", (int)size);
 		res = RTMP_HANDSHAKE_OK;
 	}
 
@@ -1889,7 +1889,7 @@
 	*buf++ = AMF_TYPE_STRING;
 	memcpy(buf, &len, 2);
 	buf += 2;
-	ast_debug(7, "Copying string : %s - strlen : %d - length : %d\n", string, strlen(string), length);
+	ast_debug(7, "Copying string : %s - strlen : %d - length : %d\n", string, (int)strlen(string), (int)length);
 
 	for(i = 0; i < length; i++) {
 		memcpy(buf++, aux++, 1);
@@ -1909,7 +1909,7 @@
 		return 0;
 	}
 
-	ast_debug(7, "Double size : %d\n", sizeof(double));
+	ast_debug(7, "Double size : %d\n", (int)sizeof(double));
 	buf = message;
 	*buf++ = AMF_TYPE_NUMBER;
 	/* copy the content of number in network byte order.
@@ -1966,7 +1966,7 @@
 		res = rtmp_set_property(buf, bobject->property);
 		buf += res;
 		tmp += res;
-		ast_debug(7, "property : %s, length : %d, res = %d, expected res = %d\n", bobject->property, strlen(bobject->property), res, 2 + strlen(bobject->property));
+		ast_debug(7, "property : %s, length : %d, res = %d, expected res = %d\n", bobject->property, (int)strlen(bobject->property), res, 2 + (int)strlen(bobject->property));
 		switch (bobject->type) {
 			case AMF_TYPE_NUMBER:
 				memcpy(&aux, bobject->value, sizeof(double));
@@ -2001,7 +2001,7 @@
 	tmp += 2;
 	*buf++ = AMF_TYPE_OBJECT_END;
 	tmp ++;
-	ast_debug(7, "Object size = %d, 1 + amf->size + 3 = %d, tmp = %d\n", buf - (char *)message, 1 + amf->size + 3, tmp);
+	ast_debug(7, "Object size = %d, 1 + amf->size + 3 = %d, tmp = %d\n", buf - (char *)message, 1 + (int)amf->size + 3, tmp);
 	ast_debug(7, "buf - 1 : %u\n", *(buf - 1));
 	ast_debug(7, "buf - 2 : %u\n", *(buf - 2));
 	ast_debug(7, "buf - 3 : %u\n", *(buf - 3));
@@ -2071,7 +2071,7 @@
 	/* reserve space for buffer to send :
 	 * header + number of 1-byte headers to insert + bodysize */
 	if (prefix) {
-		buflen = RTMP_BLOCK_SIZE + hdrlen + (chunks - 1)*1 + bodysize;
+		buflen = RTMP_BLOCK_SIZE + hdrlen + (chunks - 1)*1 + (int)bodysize;
 	} else {
 		buflen = hdrlen + (chunks - 1)*1 + bodysize;
 	}
@@ -2482,9 +2482,9 @@
 
 	ast_verbose("Received RTMP message from server :\n");
 	ast_verbose("         result       : %f\n", result);
-	ast_verbose("         level        : %s\n", level ? level : "N/A");
-	ast_verbose("         code         : %s\n", code ? code : "N/A");
-	ast_verbose("         description  : %s\n", description ? description : "N/A");
+	ast_verbose("         level        : %s\n", ast_strlen_zero(level) ? "N/A" : level);
+	ast_verbose("         code         : %s\n", ast_strlen_zero(code) ? "N/A", code);
+	ast_verbose("         description  : %s\n", ast_strlen_zero(description) ? "N/A" : description);
 	switch (res) {
 		case RTMP_REPLY_CREATESTREAM:
 			p = find_streamgroup(rtmp);




More information about the svn-commits mailing list