Parcourir la source

modules_k/pua: Temporary dialogs did not contain all of the required fields.

- Temporary dialogs are created when a SUBSCRIBE is sent to handle the timing
  issue that means that NOTIFYs can be processed before 200 OKs (the real
  dialog is created on 200 OK).
- Not every required field was filled in for the temporary dialogs so dialog
  searches were failing and duplicate dialogs created.
pd il y a 13 ans
Parent
commit
464d6a353f
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      modules_k/pua/send_subscribe.c

+ 4 - 0
modules_k/pua/send_subscribe.c

@@ -1053,8 +1053,12 @@ insert:
 		presentity->id.len = subs->id.len;
 		presentity->id.len = subs->id.len;
 		size += subs->id.len;
 		size += subs->id.len;
 
 
+		presentity->event = pres.event;
+		presentity->flag = pres.flag;
+
 		/* Set the temporary record expiry for 2 * 64T1 seconds from now */
 		/* Set the temporary record expiry for 2 * 64T1 seconds from now */
 		presentity->expires= (int)time(NULL) + 64;
 		presentity->expires= (int)time(NULL) + 64;
+		presentity->desired_expires= presentity->expires;
 
 
 		if (dbmode==PUA_DB_ONLY)
 		if (dbmode==PUA_DB_ONLY)
 		{
 		{