user -- rather than only the current user or non-personal rooms.
$Log$
+Revision 1.375 1999/09/29 21:13:17 ajc
+* CtdlWriteObject() can now store objects in personal rooms for any specified
+ user -- rather than only the current user or non-personal rooms.
+
Revision 1.374 1999/09/29 17:26:56 ajc
* serv_vcard.c: fixed crashola bug in cmd_greg()
* tools.c: simplified and improved the string tokenizer. Now it runs in a
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
void CtdlWriteObject(char *req_room, /* Room to stuff it in */
char *content_type, /* MIME type of this object */
char *tempfilename, /* Where to fetch it from */
- int is_mailbox, /* Private mailbox room? */
+ struct usersupp *is_mailbox, /* Mailbox room? */
int is_binary, /* Is encoding necessary? */
int is_unique /* Del others of this type? */
)
struct CtdlMessage *msg;
size_t len;
- lprintf(9, "CtdlWriteObject() called\n");
-
- if (is_mailbox)
- MailboxName(roomname, &CC->usersupp, req_room);
+ if (is_mailbox != NULL)
+ MailboxName(roomname, is_mailbox, req_room);
else
safestrncpy(roomname, req_room, sizeof(roomname));
+ lprintf(9, "CtdlWriteObject() to <%s>\n", roomname);
strcpy(filename, tmpnam(NULL));
fp = fopen(filename, "w");
char *content_type,
void (*CallBack) (long msgnum) );
int CtdlDeleteMessages(char *, long, char *);
-void CtdlWriteObject(char *, char *, char *, int, int, int);
+void CtdlWriteObject(char *, char *, char *, struct usersupp *, int, int);
struct CtdlMessage *CtdlFetchMessage(long msgnum);
void CtdlFreeMessage(struct CtdlMessage *msg);
void serialize_message(struct ser_ret *, struct CtdlMessage *);
fclose(fp);
/* this handy API function does all the work for us */
- CtdlWriteObject(ICQROOM, ICQMIME, temp, 1, 0, 1);
+ CtdlWriteObject(ICQROOM, ICQMIME, temp, &CC->usersupp, 0, 1);
unlink(temp);
}
fclose(fp);
/* this handy API function does all the work for us */
- CtdlWriteObject(ICQROOM, ICQCLMIME, temp, 1, 0, 1);
+ CtdlWriteObject(ICQROOM, ICQCLMIME, temp, &CC->usersupp, 0, 1);
unlink(temp);
}
char temp[PATH_MAX];
FILE *fp;
char *ser;
- char config_rm[ROOMNAMELEN];
strcpy(temp, tmpnam(NULL));
ser = vcard_serialize(v);
}
fclose(fp);
- /* these handy API functions do all the work for us */
- MailboxName(config_rm, u, CONFIGROOM);
- CtdlWriteObject(config_rm, "text/x-vcard", temp, 1, 0, 1);
+ /* This handy API function does all the work for us */
+ CtdlWriteObject(CONFIGROOM, "text/x-vcard", temp, u, 0, 1);
unlink(temp);
}