fixed compilation of urlcatcher example, checking return code of system call

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1677 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 17 years ago
parent 1f58418718
commit 1bb358edd4

@ -3,5 +3,5 @@ plug_in_name = urlcatcher
module_ldflags =
module_cflags =
COREPATH ?=../../core
COREPATH ?=../../../core
include $(COREPATH)/plug-in/Makefile.app_module

@ -75,7 +75,13 @@ AmSession* UrlCatcherFactory::onInvite(const AmSipRequest& req)
if (sdp.uri.empty())
throw AmSession::Exception(404, "Not Found Here (No Call URI found)");
system((UrlCatcherFactory::ExecCmd + " \""+sdp.uri+"\"").c_str());
int res = system((UrlCatcherFactory::ExecCmd + " \""+sdp.uri+"\"").c_str());
if (res == -1) {
ERROR("executing system command '%s'\n",
(UrlCatcherFactory::ExecCmd + " \""+sdp.uri+"\"").c_str());
} else {
DBG("command returned code %d\n", res);
}
throw AmSession::Exception(404, "Not Found Here (but I got your URL)");
}

Loading…
Cancel
Save