]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/vcard/serv_vcard.c
Remove the vCard module's attempt to create a netconfig file in the obsolete format...
[citadel.git] / citadel / modules / vcard / serv_vcard.c
index dfd745255b7e31955a5ac035fe9bbe6eff484fe3..db2f6114fc4698b42fa0b1b1535b8f1516d4dbd5 100644 (file)
@@ -2,7 +2,7 @@
  * A server-side module for Citadel which supports address book information
  * using the standard vCard format.
  * 
- * Copyright (c) 1999-2015 by the citadel.org team
+ * Copyright (c) 1999-2017 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -1534,7 +1534,7 @@ CTDL_MODULE_INIT(vcard)
                CtdlRegisterFixedOutputHook("text/x-vcard", vcard_fixed_output);
                CtdlRegisterFixedOutputHook("text/vcard", vcard_fixed_output);
 
-               /* Create the Global ADdress Book room if necessary */
+               /* Create the Global Address Book room if necessary */
                CtdlCreateRoom(ADDRESS_BOOK_ROOM, 3, "", 0, 1, 0, VIEW_ADDRESSBOOK);
 
                /* Set expiration policy to manual; otherwise objects will be lost! */
@@ -1548,19 +1548,27 @@ CTDL_MODULE_INIT(vcard)
                         * on this room even if we don't share it with any other nodes.
                         * This allows the CANCEL messages (i.e. "Purge this vCard") to be
                         * purged.
-                        */
+                        *
+                        * FIXME this no longer works
+                        *
                        assoc_file_name(filename, sizeof filename, &qr, ctdl_netcfg_dir);
                        fp = fopen(filename, "a");
-                       if (fp != NULL) fclose(fp);
-                       rv = chown(filename, CTDLUID, (-1));
-                       if (rv == -1)
-                               syslog(LOG_EMERG, "Failed to adjust ownership of: %s [%s]", 
-                                      filename, strerror(errno));
-                       rv = chmod(filename, 0600);
-                       if (rv == -1)
-                               syslog(LOG_EMERG, "Failed to adjust ownership of: %s [%s]", 
-                                      filename, strerror(errno));
+                       if (fp != NULL) {
+                               fclose(fp);
+                               rv = chown(filename, CTDLUID, (-1));
+                               if (rv == -1) {
+                                       syslog(LOG_ERR, "Failed to adjust ownership of %s: %s", filename, strerror(errno));
+                               }
+                               rv = chmod(filename, 0600);
+                               if (rv == -1) {
+                                       syslog(LOG_ERR, "Failed to adjust ownership of %s: %s", filename, strerror(errno));
+                               }
+                       }
+                       else {
+                               syslog(LOG_ERR, "Cannot create %s: %s", filename, strerror(errno));
+                       }
                }
+                        */
 
                /* for postfix tcpdict */
                CtdlRegisterServiceHook(CtdlGetConfigInt("c_pftcpdict_port"),   /* Postfix */