aboutsummaryrefslogtreecommitdiff
path: root/gconf
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-03-05 15:49:15 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-03-05 15:49:32 +0200
commit47576447626ac40b61f978836ccb5becbd2b9091 (patch)
tree8afff1cc0c69b676973a790dfc48bed8face988a /gconf
parent514797c56e431f37de9a00834281f990a7b15c46 (diff)
downloadwydawca-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')
-rw-r--r--gconf/gconf-gram.y18
-rw-r--r--gconf/gconf.h3
2 files changed, 14 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);
}
diff --git a/gconf/gconf.h b/gconf/gconf.h
index 56792a0..f3d1bf8 100644
--- a/gconf/gconf.h
+++ b/gconf/gconf.h
@@ -122,6 +122,9 @@ void gconf_line_begin (void);
void gconf_line_add (const char *text, size_t len);
char *gconf_line_finish (void);
+extern int gconf_string_convert (void *target, enum gconf_data_type type,
+ const char *string);
+
extern gconf_locus_t gconf_current_locus;
extern int gconf_error_count;
extern int gconf_default_port;

Return to:

Send suggestions and report system problems to the System administrator.