| 1318 | } |
| 1319 | |
| 1320 | static string encodeSpaces(string str) |
| 1321 | { |
| 1322 | char *buf = (char*)alloca(str.size()+2), *bp; |
| 1323 | const char *sp = str.c_str(), *esp = str.c_str() + str.size(); |
| 1324 | for (bp = buf; sp < esp; bp++, sp++) { |
| 1325 | *bp = (*sp == ' ') ? '\t' : *sp; |
| 1326 | } |
| 1327 | return string(buf,str.size()); // we did not copy the trailing nul so must specify size. |
| 1328 | } |
| 1329 | |
| 1330 | // This message is created on BTS1 to send to BTS2. |
| 1331 | string SipBase::dsHandoverMessage(string peer) const |