|
@@ -133,17 +133,25 @@ void unlink_lump_rpl(struct sip_msg * msg, struct lump_rpl* lump)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-void del_nonshm_lump_rpl( struct lump_rpl **head_list)
|
|
|
|
|
|
+void del_nonshm_lump_rpl(struct lump_rpl** list)
|
|
{
|
|
{
|
|
- struct lump_rpl *foo;
|
|
|
|
-
|
|
|
|
- while( (*head_list) && (((*head_list)->flags&LUMP_RPL_SHMEM)==0) ) {
|
|
|
|
- foo = (*head_list);
|
|
|
|
- (*head_list) = foo->next;
|
|
|
|
- free_lump_rpl( foo );
|
|
|
|
- }
|
|
|
|
|
|
+ struct lump_rpl* it, *tmp;
|
|
|
|
+ struct lump_rpl** pred;
|
|
|
|
+
|
|
|
|
+ it = *list;
|
|
|
|
+ pred = list;
|
|
|
|
+
|
|
|
|
+ while(it) {
|
|
|
|
+ if (!(it->flags & LUMP_RPL_SHMEM)) {
|
|
|
|
+ tmp = it;
|
|
|
|
+ *pred = it->next;
|
|
|
|
+ it = it->next;
|
|
|
|
+ free_lump_rpl(tmp);
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ pred = &it->next;
|
|
|
|
+ it = it->next;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|