bug #238-private. OpenBTS segfaults when receving an empty SMS destined to go out as text/plain. It no longer segfaults, but does not successfully send the message.

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2969 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Kurtis Heimerl
2012-01-05 02:25:08 +00:00
parent e15178ef3a
commit 8ba4a6a7ae
2 changed files with 7 additions and 1 deletions

View File

@@ -139,6 +139,12 @@ void SIPEngine::saveINVITE(const osip_message_t *INVITE, bool mine)
if (mINVITE!=NULL) osip_message_free(mINVITE);
osip_message_clone(INVITE,&mINVITE);
// #238-private
if (mINVITE==NULL){
LOG(ALERT) << "Message cloning failed, skipping this message.";
return;
}
mCallIDHeader = mINVITE->call_id;
// If this our own INVITE? Did we initiate the transaciton?

View File

@@ -35,7 +35,7 @@ int sqlite3_run_query(sqlite3* DB, sqlite3_stmt *stmt)
}
}
if ((src!=SQLITE_DONE) && (src!=SQLITE_ROW)) {
fprintf(stderr,"sqlite3_run_query failed: %s\n",sqlite3_errmsg(DB));
fprintf(stderr,"sqlite3_run_query failed: %s: %s\n", sqlite3_sql(stmt), sqlite3_errmsg(DB));
}
return src;
}