Remedying #538 in the public release

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3139 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Kurtis Heimerl
2012-02-03 22:46:10 +00:00
parent 39220cc85f
commit ad69cfe494

View File

@@ -51,6 +51,8 @@ ConfigurationTable gConfig("/etc/OpenBTS/OpenBTS.db");
#include <PhysicalStatus.h>
#include <SubscriberRegistry.h>
#include <sys/wait.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
@@ -123,6 +125,11 @@ void startTransceiver()
execlp(transceiverPath,transceiverPath,TRXnumARFCN,NULL);
LOG(EMERG) << "cannot find " << transceiverPath;
_exit(1);
} else {
int status;
waitpid(gTransceiverPid, &status,0);
LOG(EMERG) << "Transceiver quit with status " << status << ". Exiting.";
exit(2);
}
}
@@ -143,7 +150,8 @@ int main(int argc, char *argv[])
COUT("\n\n" << gOpenBTSWelcome << "\n");
COUT("\nStarting the system...");
startTransceiver();
Thread transceiverThread;
transceiverThread.start((void*(*)(void*)) startTransceiver, NULL);
// Start the SIP interface.
gSIPInterface.start();