]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/xmpp/serv_xmpp.c
Completed the removal of $Id$ tags in the Citadel server. Also, since the strings...
[citadel.git] / citadel / modules / xmpp / serv_xmpp.c
index d9271e46469235b1fdc731e47bd6186e7f7a6d4b..5015c3184267b70a26f98364bbaf013efefc8195 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$ 
- *
  * XMPP (Jabber) service for the Citadel system
  * Copyright (c) 2007-2010 by Art Cancro
  *
@@ -95,11 +93,16 @@ char *xmlesc(char *buf, char *str, int bufsiz)
                        strcpy(&buf[len], "&");
                        len += 5;
                }
-               else if (ch <= 0x7F) {
+               else if ((ch >= 0x20) && (ch <= 0x7F)) {
                        buf[len++] = ch;
                        buf[len] = 0;
                }
-               else if (ch > 0x7F) {
+               else if (ch < 0x20) {
+                       /* we probably shouldn't be doing this */
+                       buf[len++] = '_';
+                       buf[len] = 0;
+               }
+               else {
                        char oct[10];
                        sprintf(oct, "&#%o;", ch);
                        strcpy(&buf[len], oct);
@@ -508,6 +511,7 @@ void xmpp_cleanup_function(void) {
  * Here's where our XMPP session begins its happy day.
  */
 void xmpp_greeting(void) {
+       client_set_inbound_buf(4);
        strcpy(CC->cs_clientname, "XMPP session");
        CC->session_specific_data = malloc(sizeof(citxmpp));
        memset(XMPP, 0, sizeof(citxmpp));
@@ -595,5 +599,5 @@ CTDL_MODULE_INIT(xmpp)
        }
 
        /* return our Subversion id for the Log */
-       return "$Id$";
+       return "xmpp";
 }