Browse code

3600 is used as default value when expires contact parameter parser fails. Credits go to Nils who drew my attention to this.

Jan Janak authored on 18/01/2003 14:22:31
Showing 1 changed files
... ...
@@ -223,9 +223,12 @@ int calc_contact_expires(struct sip_msg* _m, cparam_t* _ep, int* _e)
223 223
 		*_e = get_expires_hf(_m);
224 224
 	} else {
225 225
 		if (atoi(&_ep->body, _e) < 0) {
226
-			rerrno = R_INV_EXP; /* Invalid expires parameter */
227
-			LOG(L_ERR, "calc_contact_expires(): Invalid expires parameter\n");
228
-			return -1;
226
+			*_e = 3600;
227
+			     /*
228
+			       rerrno = R_INV_EXP;
229
+			       LOG(L_ERR, "calc_contact_expires(): Invalid expires parameter\n");
230
+			       return -1;
231
+			     */
229 232
 		}
230 233
 		     /* Convert to absolute value */
231 234
 		if (*_e != 0) *_e += act_time;