X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fuseredit.c;h=baffe100547074d5db9cf04ae306e8defcf83268;hb=20fecd19b462c6aee88abcc6243666a1bc2b9fee;hp=02aea240ea596d133049299a0a32907da2bcbb02;hpb=08ceff759cbeb9a05d9adef01d391b2778c89162;p=citadel.git diff --git a/webcit/useredit.c b/webcit/useredit.c index 02aea240e..baffe1005 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -473,20 +473,22 @@ TRYAGAIN: void display_edit_address_book_entry(const char *username, long usernum) { message_summary *VCMsg = NULL; wc_mime_attachment *VCAtt = NULL; - char roomname[SIZ]; + StrBuf *roomname; StrBuf *Buf; char error_message[SIZ]; long vcard_msgnum = (-1L); /** Locate the user's config room, creating it if necessary */ Buf = NewStrBuf(); - serv_printf("GOTO %010ld.%s||1", usernum, USERCONFIGROOM); + roomname = NewStrBuf(); + StrBufPrintf(roomname, "%010ld.%s", usernum, USERCONFIGROOM); + serv_printf("GOTO %s||1", ChrPtr(roomname)); StrBuf_ServGetlnBuffered(Buf); if (GetServerStatus(Buf, NULL) != 2) { - serv_printf("CRE8 1|%010ld.%s|5|||1|", usernum, USERCONFIGROOM); + serv_printf("CRE8 1|%s|5|||1|", ChrPtr(roomname)); StrBuf_ServGetlnBuffered(Buf); GetServerStatus(Buf, NULL); - serv_printf("GOTO %010ld.%s||1", usernum, USERCONFIGROOM); + serv_printf("GOTO %s||1", ChrPtr(roomname)); StrBuf_ServGetlnBuffered(Buf); if (GetServerStatus(Buf, NULL) != 2) { StrBufCutLeft(Buf, 4); @@ -495,6 +497,7 @@ void display_edit_address_book_entry(const char *username, long usernum) { "%s

\n", ChrPtr(Buf)); select_user_to_edit(error_message, username); FreeStrBuf(&Buf); + FreeStrBuf(&roomname); return; } } @@ -508,6 +511,7 @@ void display_edit_address_book_entry(const char *username, long usernum) { _("An error occurred while trying to create or edit this address book entry.") ); select_user_to_edit(error_message, username); + FreeStrBuf(&roomname); return; } @@ -515,7 +519,8 @@ void display_edit_address_book_entry(const char *username, long usernum) { VCMsg, VCAtt, "select_user_to_edit", - roomname); + ChrPtr(roomname)); + FreeStrBuf(&roomname); }