[Serdev] Fix for registrar module in ser-0.9.3 when no expires
header exists
Evan Borgström
evan.borgstrom at ca.mci.com
Thu Jun 16 20:07:36 UTC 2005
Attached is a fix for the registrar module that fixes REGISTER packets
meant to de-register but that contain only an ;expires tag in the
contact and no Expires: header.
When clients would send a REGISTER packet without the Expires header
but that had an ;expires=0 in the contact list SER would crash and
eventually put a "BUG: qm_free" message to the debug logs then exit.
-Evan
-------------- next part --------------
--- ser-0.9.3.orig/modules/registrar/sip_msg.c 2005-06-14 11:47:34.000000000 -0400
+++ ser-0.9.3/modules/registrar/sip_msg.c 2005-06-14 11:56:39.000000000 -0400
@@ -98,10 +98,14 @@
return -4;
}
- if (_m->expires && !_m->expires->parsed && (parse_expires(_m->expires) < 0)) {
- rerrno = R_PARSE_EXP;
- LOG(L_ERR, "parse_message(): Error while parsing expires body\n");
- return -5;
+ if (_m->expires) {
+ if (!_m->expires->parsed && (parse_expires(_m->expires) < 0)) {
+ rerrno = R_PARSE_EXP;
+ LOG(L_ERR, "parse_message(): Error while parsing expires body\n");
+ return -5;
+ }
+ } else {
+ _m->expires = 0;
}
if (_m->contact) {
More information about the Serdev
mailing list