[rtmpdump] r352 - trunk/librtmp/hashswf.c

hyc subversion at mplayerhq.hu
Sun Mar 14 06:31:37 CET 2010


Author: hyc
Date: Sun Mar 14 06:31:36 2010
New Revision: 352

Log:
Use HOMEPATH on Windows, not HOME

Modified:
   trunk/librtmp/hashswf.c

Modified: trunk/librtmp/hashswf.c
==============================================================================
--- trunk/librtmp/hashswf.c	Sun Mar 14 05:48:14 2010	(r351)
+++ trunk/librtmp/hashswf.c	Sun Mar 14 06:31:36 2010	(r352)
@@ -396,6 +396,12 @@ strtime(time_t * t, char *s)
 
 #define HEX2BIN(a)      (((a)&0x40)?((a)&0xf)+9:((a)&0xf))
 
+#ifdef WIN32
+#define	ENV_HOME	"HOMEPATH"
+#else
+#define ENV_HOME	"HOME"
+#endif
+
 int
 RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash,
 	     int age)
@@ -413,7 +419,7 @@ RTMP_HashSWF(const char *url, unsigned i
   HMAC_CTX ctx;
 
   date[0] = '\0';
-  home = getenv("HOME");
+  home = getenv(ENV_HOME);
   if (!home)
     home = ".";
 


More information about the rtmpdump mailing list