diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-03-05 15:49:15 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-03-05 15:49:32 +0200 |
commit | 47576447626ac40b61f978836ccb5becbd2b9091 (patch) | |
tree | 8afff1cc0c69b676973a790dfc48bed8face988a /gconf/gconf-gram.y | |
parent | 514797c56e431f37de9a00834281f990a7b15c46 (diff) | |
download | wydawca-47576447626ac40b61f978836ccb5becbd2b9091.tar.gz wydawca-47576447626ac40b61f978836ccb5becbd2b9091.tar.bz2 |
Improve locking.
* gconf/gconf-gram.y (string_convert): Rename to gconf_string_convert, make
extern. All uses updated.
* gconf/gconf.h (gconf_string_convert): New proto.
(wydawca_kw): `locking' block statement.
* src/job.c: Introduce a delay before restarting a tempfailed job.
Do not trigger error reporting on tempfail
* src/lock.c: Retry locking attempts, according to configuration.
* src/wydawca.h (lock_retry_attempts, lock_retry_interval): New declarations.
Diffstat (limited to 'gconf/gconf-gram.y')
-rw-r--r-- | gconf/gconf-gram.y | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gconf/gconf-gram.y b/gconf/gconf-gram.y index 66b5416..c2d833b 100644 --- a/gconf/gconf-gram.y +++ b/gconf/gconf-gram.y @@ -594,8 +594,9 @@ string_to_sockaddr (struct gconf_sockaddr *sp, const char *string) return 0; } -static int -string_convert (void *target, enum gconf_data_type type, const char *string) +int +gconf_string_convert (void *target, enum gconf_data_type type, + const char *string) { uintmax_t uval; intmax_t sval; @@ -699,11 +700,14 @@ string_convert (void *target, enum gconf_data_type type, const char *string) /* FIXME: */ case gconf_type_cidr: - - case gconf_type_section: gconf_error (&gconf_current_locus, 0, _("INTERNAL ERROR at %s:%d"), __FILE__, __LINE__); abort(); + + case gconf_type_section: + gconf_error (&gconf_current_locus, 0, + _("Invalid use of block statement")); + return 1; } return 0; } @@ -828,7 +832,7 @@ process_ident (struct gconf_keyword *kwp, gconf_value_t *value) else { void *ptr = xmalloc (size); - if (string_convert (ptr, type, vp->v.string) == 0) + if (gconf_string_convert (ptr, type, vp->v.string) == 0) gl_list_add_last (list, ptr); else free (ptr); @@ -871,7 +875,7 @@ process_ident (struct gconf_keyword *kwp, gconf_value_t *value) else { ptr = xmalloc (size); - if (string_convert (ptr, type, value->v.string)) + if (gconf_string_convert (ptr, type, value->v.string)) { free (ptr); gl_list_free (list); @@ -882,6 +886,6 @@ process_ident (struct gconf_keyword *kwp, gconf_value_t *value) *(gl_list_t*)target = list; } else - string_convert (target, GCONF_TYPE (kwp->type), value->v.string); + gconf_string_convert (target, GCONF_TYPE (kwp->type), value->v.string); } |