merge anthm fix for atoi(NULL) segfault. Thanks jart for identifying the problem.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1560 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-06-07 21:55:17 +00:00
parent 8b7f997c3f
commit 9c2442886d
2 changed files with 5 additions and 3 deletions

View File

@ -101,7 +101,6 @@ END_EXTERN_C
* Additionally, the experimental external modules make use of several external modules:
*
* mod_Exosip:
* - JRTPlib (http://research.edm.luc.ac.be/jori/jrtplib/jrtplib.html)
* - eXoSIP (http://savannah.nongnu.org/projects/exosip/)
*
* mod_iaxchan:

View File

@ -1575,8 +1575,11 @@ static void handle_message_new(eXosip_event_t *je)
}
expires = get_header_value(je, "expires");
exptime = time(NULL) + atoi(expires) + 20;
if ((expires = get_header_value(je, "expires"))) {
exptime = time(NULL) + atoi(expires) + 20;
} else {
exptime = time(NULL) + 3600;
}
if (!find_reg_url(globals.db, je->request->from->url->username, sql, sizeof(sql))) {