diff --git a/daemon/commands/help.cc b/daemon/commands/help.cc
index e3c44edad..23c08f523 100644
--- a/daemon/commands/help.cc
+++ b/daemon/commands/help.cc
@@ -22,7 +22,7 @@ void HelpCommand::exec(Daemon *app, const char *args) {
if (args==NULL){
for (it = l.begin(); it != l.end(); ++it) {
- ost << (*it)->getHelp() << endl;
+ ost << (*it)->getProto() << endl;
}
}
Response resp;
diff --git a/daemon/commands/msfilter-add-fmtp.cc b/daemon/commands/msfilter-add-fmtp.cc
index c2198fb68..1fd2997ff 100644
--- a/daemon/commands/msfilter-add-fmtp.cc
+++ b/daemon/commands/msfilter-add-fmtp.cc
@@ -27,6 +27,10 @@ void MSFilterAddFmtpCommand::exec(Daemon *app, const char *args) {
app->sendResponse(Response("No Call with such id."));
return;
}
+ if (call->audiostream==NULL || call->audiostream->encoder==NULL){
+ app->sendResponse(Response("This call doesn't have an active audio stream."));
+ return;
+ }
ms_filter_call_method(call->audiostream->encoder, MS_FILTER_ADD_FMTP, (void*) args);
} else if(strcmp(type, "stream") == 0) {
AudioStream *stream = app->findAudioStream(id);
diff --git a/daemon/daemon.cc b/daemon/daemon.cc
index 3daa8d981..f445098a2 100644
--- a/daemon/daemon.cc
+++ b/daemon/daemon.cc
@@ -548,6 +548,59 @@ void Daemon::dumpCommandsHelp() {
}
}
+static string htmlEscape(const string &orig){
+ string ret=orig;
+ size_t pos;
+
+ while(1){
+ pos=ret.find('<');
+ if (pos!=string::npos){
+ ret.erase(pos,1);
+ ret.insert(pos,"<");
+ continue;
+ }
+ pos=ret.find('>');
+ if (pos!=string::npos){
+ ret.erase(pos,1);
+ ret.insert(pos,">");
+ continue;
+ }
+ break;
+ }
+ while(1){
+ pos=ret.find('\n');
+ if (pos!=string::npos){
+ ret.erase(pos,1);
+ ret.insert(pos,"
");
+ continue;
+ }
+ break;
+ }
+ return ret;
+}
+
+void Daemon::dumpCommandsHelpHtml(){
+ cout << endl;
+ cout << "
";
+ for(list
"<
"<
";
+ }
+ cout<<"