Fix timestamp marshalling.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 26 Jan 2008 14:29:00 +0000 (15:29 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 26 Jan 2008 14:29:00 +0000 (15:29 +0100)
NEWS
src/linestack_file.c

diff --git a/NEWS b/NEWS
index 3237487570a244703e0d850024aed1ae8172192a..05eb98c62095957296848ac355dfc3f2925a9f5f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,8 @@ Ctrlproxy 3.0.6 UNRELEASED
        * Fix hostmask and response code returned by USERHOST in administration 
          network.
 
+       * Fix timestamp marshalling. (#180)
+
 Ctrlproxy 3.0.5 2007-12-07
 
   IMPROVEMENTS
index 583504714ff68b07583cc0990a448d574713aa39..34e7ed43ab18165c00abe13608179f3f700a4ba6 100644 (file)
@@ -229,7 +229,7 @@ static gboolean marshall_int(struct network_state *nst, const char *name, int le
 static gboolean marshall_time(struct network_state *nst, const char *name, int level, enum marshall_mode m, GIOChannel *t, time_t *n)
 {
        if (m == MARSHALL_PUSH) {
-               char tmp[10];
+               char tmp[20];
                GError *error = NULL;
                GIOStatus status;
                g_snprintf(tmp, sizeof(tmp), "%lu", *n);
@@ -240,7 +240,7 @@ static gboolean marshall_time(struct network_state *nst, const char *name, int l
                gboolean ret = marshall_get(t, level, name, &tmp);
                if (!ret) return FALSE;
 
-               *n = atol(tmp);
+               *n = strtoul(tmp, NULL, 10);
 
                g_free(tmp);