From 193af441a127a0daabbd17c512e34817ddbcadfd Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sat, 16 Mar 2002 23:10:52 +0000 Subject: - ncpd now works with both Series 3 and Series 5 - ncpd now has autobaud feature (default on), which cycles baudrate - lib: added getSpeed() for retrieving current speed of connection - plpftp: Use getSpeed() - plpbackup: Ongoing work - configure stuff: removed several entries from acconfig.h comments now defined as 3rd arg to AC_DEFINE... --- lib/rfsv16.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'lib/rfsv16.cc') diff --git a/lib/rfsv16.cc b/lib/rfsv16.cc index 2474060..773a5c1 100644 --- a/lib/rfsv16.cc +++ b/lib/rfsv16.cc @@ -222,10 +222,21 @@ fgetmtime(const char * const name, PsiTime &mtime) Enum rfsv16:: fsetmtime(const char *name, PsiTime mtime) { - cerr << "rfsv16::fsetmtime ***" << endl; - // I don't think there's a protocol frame that allows us to set the - // modification time. SFDATE allows setting of creation time... - return E_PSI_NOT_SIBO; + // According to Alexander's protocol doc, SFDATE sets the modification + // time - and as far as I can see SIBO only keeps a modification + // time. So call SFDATE here. + bufferStore a; + string realName = convertSlash(name); + a.addDWord(mtime.getTime()); + a.addStringT(realName.c_str()); + // and this needs sending in the length word. + if (!sendCommand(SFDATE, a)) + return E_PSI_FILE_DISC; + + Enum res = getResponse(a); + if (res != E_PSI_GEN_NONE) + cerr << "fsetmtime: Error " << res << " on file " << name << endl; + return res; } Enum rfsv16:: -- cgit v1.2.3