]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/vcard/serv_vcard.c
Saving my place while we try something...
[citadel.git] / citadel / modules / vcard / serv_vcard.c
index 21a99b2d0aae3b99aad1674d320225cc56700600..413be56ff08fc7ac0c72f751c147bbef4d5625ea 100644 (file)
 #include <errno.h>
 #include <ctype.h>
 #include <sys/types.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
+#include <time.h>
 #include <sys/wait.h>
 #include <string.h>
 #include <limits.h>
@@ -190,7 +179,7 @@ void vcard_extract_vcard(char *name, char *filename, char *partnum, char *disp,
  * function accordingly (delete the user's existing vCard in the config room
  * and in the global address book).
  */
-int vcard_upload_beforesave(struct CtdlMessage *msg, recptypes *recp) {
+int vcard_upload_beforesave(struct CtdlMessage *msg, struct recptypes *recp) {
        char *s;
        char buf[SIZ];
        struct ctdluser usbuf;
@@ -369,7 +358,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg, recptypes *recp) {
  * function accordingly (copy the vCard from the config room to the global
  * address book).
  */
-int vcard_upload_aftersave(struct CtdlMessage *msg, recptypes *recp) {
+int vcard_upload_aftersave(struct CtdlMessage *msg, struct recptypes *recp) {
        char *ptr;
        int linelen;
        long I;
@@ -544,7 +533,6 @@ void vcard_write_user(struct ctdluser *u, struct vCard *v) {
                        strlen(ser)+1,          /* length */
                        u,                      /* which user */
                        0,                      /* not binary */
-                       0,                      /* don't delete others of this type */
                        0);                     /* no flags */
 
        free(ser);
@@ -935,11 +923,11 @@ void check_get(void) {
        
        if (strncasecmp(cmdbuf, "GET ", 4)==0)
        {
-               recptypes *rcpt;
+               struct recptypes *rcpt;
                char *argbuf = &cmdbuf[4];
                
                extract_token(internet_addr, argbuf, 0, '|', sizeof internet_addr);
-               rcpt = validate_recipients(internet_addr, NULL, CHECK_EXISTANCE);
+               rcpt = validate_recipients(internet_addr, NULL, CHECK_EXIST);
                if (    (rcpt != NULL) &&
                        (
                                (*rcpt->recp_local != '\0') ||
@@ -951,7 +939,7 @@ void check_get(void) {
                }
                else 
                {
-                       cprintf("500 REJECT noone here by that name.\n");
+                       cprintf("500 REJECT no one here by that name.\n");
                        
                        syslog(LOG_INFO, "vcard: sending 500 REJECT no one here by that name: %s", internet_addr);
                }
@@ -1164,7 +1152,7 @@ void store_this_ha(struct addresses_to_be_filed *aptr) {
                        vcard_free(v);
 
                        syslog(LOG_DEBUG, "vcard: adding contact: %s", recipient);
-                       CtdlSubmitMsg(vmsg, NULL, aptr->roomname, QP_EADDR);
+                       CtdlSubmitMsg(vmsg, NULL, aptr->roomname);
                        CM_Free(vmsg);
                }
        }