Rename and move STOP signal from Transceiver to main

The callback actually belongs there, since it's the code/thread in main the one
actually in charge of stopping everything. It simplifies current code,
and more important, allows for new clients of this signal to use it.
This callback will also be used in forthcoming commits by code
controlling rate_ctr thresholds to stop the process if the VTY
configured threshold is used.

Change-Id: Id4159e64225c6606fef34a74b24f37c3a071aceb
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 54b9ddd..9c55d02 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -119,7 +119,7 @@
   : mBasePort(wBasePort), mLocalAddr(TRXAddress), mRemoteAddr(GSMcoreAddress),
     mClockSocket(TRXAddress, wBasePort, GSMcoreAddress, wBasePort + 100),
     mTransmitLatency(wTransmitLatency), mRadioInterface(wRadioInterface),
-    rssiOffset(wRssiOffset), sig_cbfn(NULL),
+    rssiOffset(wRssiOffset),
     mSPSTx(tx_sps), mSPSRx(rx_sps), mChans(chans), mEdge(false), mOn(false), mForceClockInterface(false),
     mTxFreq(0.0), mRxFreq(0.0), mTSC(0), mMaxExpectedDelayAB(0), mMaxExpectedDelayNB(0),
     mWriteBurstToDiskMask(0)
@@ -225,17 +225,6 @@
   return true;
 }
 
-void Transceiver::setSignalHandler(osmo_signal_cbfn cbfn)
-{
-  if (this->sig_cbfn)
-    osmo_signal_unregister_handler(SS_TRANSC, this->sig_cbfn, NULL);
-
-  if (cbfn) {
-    this->sig_cbfn = cbfn;
-    osmo_signal_register_handler(SS_TRANSC, this->sig_cbfn, NULL);
-  }
-}
-
 /*
  * Start the transceiver
  *
@@ -910,7 +899,7 @@
     usleep(100000);
   } else if (rc < 0) {
     LOG(FATAL) << "radio Interface receive failed, requesting stop.";
-    osmo_signal_dispatch(SS_TRANSC, S_TRANSC_STOP_REQUIRED, this);
+    osmo_signal_dispatch(SS_MAIN, S_MAIN_STOP_REQUIRED, NULL);
   } else if (mForceClockInterface || mTransmitDeadlineClock > mLastClockUpdateTime + GSM::Time(216,0)) {
     mForceClockInterface = false;
     writeClockInterface();