aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-25 14:47:51 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-03-25 14:48:22 +0300
commit1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d (patch)
treedb4e9d92380de549834efc6b50603ac933127c7a /src/server.cpp
parent524c78a8d696e2ff980db7c60272032b4028864b (diff)
downloadminetest-1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d.tar.gz
minetest-1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d.tar.bz2
minetest-1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d.zip
Almost support loading sounds from server
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 13a8ebf7d..02734bbc0 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -51,6 +51,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "utility_string.h"
#include "sound.h" // dummySoundManager
#include "event_manager.h"
+#include "hex.h"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
@@ -3996,14 +3997,13 @@ void Server::fillMediaCache()
sha1.addBytes(tmp_os.str().c_str(), tmp_os.str().length());
unsigned char *digest = sha1.getDigest();
- std::string digest_string = base64_encode(digest, 20);
-
+ std::string sha1_base64 = base64_encode(digest, 20);
+ std::string sha1_hex = hex_encode((char*)digest, 20);
free(digest);
// Put in list
- this->m_media[filename] = MediaInfo(filepath, digest_string);
- verbosestream<<"Server: sha1 for "<<filename<<"\tis "
- <<digest_string<<std::endl;
+ this->m_media[filename] = MediaInfo(filepath, sha1_base64);
+ verbosestream<<"Server: "<<sha1_hex<<" is "<<filename<<std::endl;
}
}
}