mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Bad hack for incoming call...
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
TEMPLATE = app
|
||||
TARGET +=
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
INCLUDEPATH += /usr/lib/qt4/include/Qt/
|
||||
QT += network
|
||||
#CONFIG += debug
|
||||
|
||||
|
@ -37,7 +37,7 @@ RequestFactory::create(const std::string& requestLine)
|
||||
iter = tList.begin();
|
||||
|
||||
// there is atleast a second token (the sequenceId)
|
||||
if (iter != tList.end() && iter->find("seq") == 0 ) {
|
||||
if (iter != tList.end() && iter->size() != 0 ) {
|
||||
std::string sequenceId = *iter;
|
||||
tList.pop_front();
|
||||
try {
|
||||
|
@ -556,6 +556,22 @@ SipVoIPLink::getEvent (void)
|
||||
switch (event->type) {
|
||||
// IP-Phone user receives a new call
|
||||
case EXOSIP_CALL_INVITE: //
|
||||
// TODO: remove this hack, when there is no
|
||||
// buffer overflow in event->request->bodies->body...
|
||||
if (event->request!=NULL && event->request->bodies!=NULL) {
|
||||
if (!osip_list_eol (event->request->bodies, 0)) {
|
||||
osip_body_t* t = (osip_body_t *)osip_list_get (event->request->bodies, 0);
|
||||
if (t!=NULL && t->body!=NULL) {
|
||||
char *lastnewline = strrchr(t->body, '\n');
|
||||
if (lastnewline != NULL ) {
|
||||
lastnewline++;
|
||||
if (*lastnewline != '\0') {
|
||||
_debug("EXOSIP_CALL_INVITE: request error patched\n"); }
|
||||
*lastnewline = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Set local random port for incoming call
|
||||
if (!Manager::instance().useStun()) {
|
||||
setLocalPort(RANDOM_LOCAL_PORT);
|
||||
|
Reference in New Issue
Block a user