FLOCK(COOKIEJAR(self)->lock, F_WRLCK);
SoupDate *expire;
if (new_cookie) {
- /* session-expire-time handling */
- if (vb.config.cookie_expire_time == 0) {
- soup_cookie_set_expires(new_cookie, NULL);
+ /* session-expire-time handling */
+ if (vb.config.cookie_expire_time == 0) {
+ soup_cookie_set_expires(new_cookie, NULL);
- } else if (vb.config.cookie_expire_time > 0 && new_cookie->expires) {
- expire = soup_date_new_from_now(vb.config.cookie_expire_time);
- if (soup_date_to_time_t(expire) < soup_date_to_time_t(new_cookie->expires)) {
- soup_cookie_set_expires(new_cookie, expire);
- }
- soup_date_free(expire);
- }
+ } else if (vb.config.cookie_expire_time > 0 && new_cookie->expires) {
+ expire = soup_date_new_from_now(vb.config.cookie_expire_time);
+ if (soup_date_to_time_t(expire) < soup_date_to_time_t(new_cookie->expires)) {
+ soup_cookie_set_expires(new_cookie, expire);
+ }
+ soup_date_free(expire);
+ }
- /* session-cookie handling */
- if (!new_cookie->expires && vb.config.cookie_timeout) {
- expire = soup_date_new_from_now(vb.config.cookie_timeout);
- soup_cookie_set_expires(new_cookie, expire);
- soup_date_free(expire);
- }
+ /* session-cookie handling */
+ if (!new_cookie->expires && vb.config.cookie_timeout) {
+ expire = soup_date_new_from_now(vb.config.cookie_timeout);
+ soup_cookie_set_expires(new_cookie, expire);
+ soup_date_free(expire);
+ }
}
SOUP_COOKIE_JAR_CLASS(cookiejar_parent_class)->changed(self, old_cookie, new_cookie);
FLOCK(COOKIEJAR(self)->lock, F_UNLCK);