This is called from a runloop in apps/OpenBTS.cpp If it returns a negative number OpenBTS exists.
| 149 | // This is called from a runloop in apps/OpenBTS.cpp |
| 150 | // If it returns a negative number OpenBTS exists. |
| 151 | CLIStatus Parser::process(const char* line, ostream& os) const |
| 152 | { |
| 153 | static Mutex oneCommandAtATime; |
| 154 | ScopedLock lock(oneCommandAtATime); |
| 155 | char *newLine = strdup(line); |
| 156 | CLIStatus retVal = execute(newLine,os); |
| 157 | free(newLine); |
| 158 | if (retVal < 0 || retVal > FAILURE) { |
| 159 | os << "Unrecognized CLI command exit status: "<<retVal << endl; |
| 160 | } else if (retVal != SUCCESS) { |
| 161 | os << standardResponses[retVal] << endl; |
| 162 | } |
| 163 | return retVal; |
| 164 | } |
| 165 | |
| 166 | |
| 167 | static void *commandLineFunc(void *arg) |
no outgoing calls
no test coverage detected