aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHoward Chu <hyc@highlandsun.com>2010-05-15 22:13:17 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-05-15 22:13:17 +0200
commit027ceb37a1075bb585c8f5917a26f37cdfa352d6 (patch)
treec7af589035e8ae2189279553de482d8cbaedf084 /lib
parent510836f80b8b3ad32cb1d6b8fbdf70d1fd3b772c (diff)
RMTP: the version code is now rtmp aware
Diffstat (limited to 'lib')
-rw-r--r--lib/version.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/lib/version.c b/lib/version.c
index 86cb113d7..6144f3268 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -44,6 +44,10 @@
#include <iconv.h>
#endif
+#ifdef USE_LIBRTMP
+#include <librtmp/rtmp.h>
+#endif
+
#ifdef USE_LIBSSH2
#include <libssh2.h>
#endif
@@ -107,15 +111,29 @@ char *curl_version(void)
ptr += len;
#endif
#ifdef USE_LIBSSH2
- (void)snprintf(ptr, left, " libssh2/%s", CURL_LIBSSH2_VERSION);
-/*
- If another lib version is added below libssh2, this code would instead
- have to do:
-
len = snprintf(ptr, left, " libssh2/%s", CURL_LIBSSH2_VERSION);
left -= len;
ptr += len;
+#endif
+#ifdef USE_LIBRTMP
+ {
+ char suff[2];
+ if (RTMP_LIB_VERSION & 0xff) {
+ suff[0] = (RTMP_LIB_VERSION & 0xff) + 'a' - 1;
+ suff[1] = '\0';
+ } else {
+ suff[0] = '\0';
+ }
+ len = snprintf(ptr, left, " librtmp/%d.%d%s",
+ RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, suff);
+/*
+ If another lib version is added below this one, this code would
+ also have to do:
+
+ left -= len;
+ ptr += len;
*/
+ }
#endif
return version;
@@ -164,6 +182,9 @@ static const char * const protocols[] = {
#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)
"pop3s",
#endif
+#ifdef USE_LIBRTMP
+ "rtmp",
+#endif
#ifndef CURL_DISABLE_RTSP
"rtsp",
#endif