ddvtech / mistlib Goto Github PK
View Code? Open in Web Editor NEWThe official source repository for libmist.
The official source repository for libmist.
I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.
Would you like to add more error handling for return values from functions like the following?
I suggest to reuse a higher level build system than your current small make file so that powerful checks for software features will become easier.
I've done different streaming tests on a LAN and quite often MistBuffer locks up in mistlib dtsc.cpp updateHeaders in the code block which starts on line 417:
// delete fragments of which the beginning can no longer be reached
while (metadata["frags"][0u]["num"].asInt() < metadata["keynum"][0u].asInt()){
metadata["frags"].shrink(metadata["frags"].size() - 1);
// increase the missed fragments counter
metadata["missed_frags"] = metadata["missed_frags"].asInt() + 1;
}
Basically, what seems to happen is that metadata["frags"].size() ends up being 0, but then when metadata["frags"][0u]["num"] is checked the size goes back to 1 (and returns 0 for the "num"), and the loop never terminates.
A hacky workaround which seems to ameliorate the problem is to add a size check in the while loop condition, like this:
while (metadata["frags"].size() > 0 && metadata["frags"][0u]["num"].asInt() < metadata["keynum"][0u].asInt()){
However, this is probably a bit lame and someone who is more familiar with the code can probably think of a better fix :-)
If I run make, I get the following error:
config.cpp:11:18: error: wait.h: No such file or directory
config.cpp: In function ‘void Util::Daemonize()’:
config.cpp:403: warning: ‘daemon’ is deprecated (declared at /usr/include/stdlib.h:292)
config.cpp:403: warning: ‘daemon’ is deprecated (declared at /usr/include/stdlib.h:292)
make[1]: *** [config.lo] Error 1
make: *** [all-recursive] Error 1
Full log: gist
On ubuntu 12.10, when building from git, compilation stops after a short while looking for openssl headers:
[..]
auth.cpp:2:25: fatal error: openssl/rsa.h: No such file or directory
compilation terminated.
make[1]: *** [auth.lo] Error 1
make[1]: Leaving directory `/home/lkarsten/mistlib/lib'
make: *** [all-recursive] Error 1
lkarsten@host:~/mistlib$
Fix: apt-get install libssl-dev
This should be handled by configure/automake.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.