projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce0aea9
)
* remove serv_getln here too
author
Wilfried Göesgens
<willi@citadel.org>
Mon, 4 May 2009 21:49:02 +0000
(21:49 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Mon, 4 May 2009 21:49:02 +0000
(21:49 +0000)
webcit/serv_func.c
patch
|
blob
|
history
diff --git
a/webcit/serv_func.c
b/webcit/serv_func.c
index 7dbc16c940d10037122e841f8e2df9d115492a78..2d8188cb0cca912bddadf4e6799ed66f2f21468c 100644
(file)
--- a/
webcit/serv_func.c
+++ b/
webcit/serv_func.c
@@
-33,9
+33,9
@@
ServInfo *get_serv_info(StrBuf *browser_host, char *user_agent)
{
ServInfo *info;
StrBuf *Buf;
{
ServInfo *info;
StrBuf *Buf;
- char buf[SIZ];
int a;
int a;
+ Buf = NewStrBuf();
/** Tell the server what kind of client is connecting */
serv_printf("IDEN %d|%d|%d|%s|%s",
DEVELOPER_ID,
/** Tell the server what kind of client is connecting */
serv_printf("IDEN %d|%d|%d|%s|%s",
DEVELOPER_ID,
@@
-44,11
+44,11
@@
ServInfo *get_serv_info(StrBuf *browser_host, char *user_agent)
user_agent,
ChrPtr(browser_host)
);
user_agent,
ChrPtr(browser_host)
);
-
serv_getln(buf, sizeof b
uf);
+
StrBuf_ServGetln(B
uf);
/** Tell the server what kind of richtext we prefer */
serv_puts("MSGP text/calendar|text/html|text/plain");
/** Tell the server what kind of richtext we prefer */
serv_puts("MSGP text/calendar|text/html|text/plain");
-
serv_getln(buf, sizeof b
uf);
+
StrBuf_ServGetln(B
uf);
/*
* Tell the server that when we save a calendar event, we
/*
* Tell the server that when we save a calendar event, we
@@
-56,18
+56,19
@@
ServInfo *get_serv_info(StrBuf *browser_host, char *user_agent)
* instead of by the client.
*/
serv_puts("ICAL sgi|1");
* instead of by the client.
*/
serv_puts("ICAL sgi|1");
-
serv_getln(buf, sizeof b
uf);
+
StrBuf_ServGetln(B
uf);
/** Now ask the server to tell us a little bit about itself... */
serv_puts("INFO");
/** Now ask the server to tell us a little bit about itself... */
serv_puts("INFO");
- serv_getln(buf, sizeof buf);
- if (buf[0] != '1')
+ StrBuf_ServGetln(Buf);
+ if (GetServerStatus(Buf, NULL) != 1) {
+ FreeStrBuf(&Buf);
return NULL;
return NULL;
+ }
info = (ServInfo*)malloc(sizeof(ServInfo));
memset(info, 0, sizeof(ServInfo));
a = 0;
info = (ServInfo*)malloc(sizeof(ServInfo));
memset(info, 0, sizeof(ServInfo));
a = 0;
- Buf = NewStrBuf();
while (StrBuf_ServGetln(Buf), (strcmp(ChrPtr(Buf), "000")!= 0)) {
/* lprintf (1, "a: %d [%s]", a, ChrPtr(Buf));*/
switch (a) {
while (StrBuf_ServGetln(Buf), (strcmp(ChrPtr(Buf), "000")!= 0)) {
/* lprintf (1, "a: %d [%s]", a, ChrPtr(Buf));*/
switch (a) {