[Freeswitch-svn] [commit] r3850 - freeswitch/trunk/src/mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Wed Dec 27 13:42:32 EST 2006


Author: anthm
Date: Wed Dec 27 13:42:32 2006
New Revision: 3850

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c

Log:
chop off resource in chat stuff

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Wed Dec 27 13:42:32 2006
@@ -391,7 +391,7 @@
 
 static switch_status_t chat_send(char *proto, char *from, char *to, char *subject, char *body, char *hint)
 {
-	char *user, *host, *f_user = NULL, *ffrom = NULL, *f_host = NULL;
+	char *user, *host, *f_user = NULL, *ffrom = NULL, *f_host = NULL, *f_resource = NULL;
 	struct mdl_profile *profile = NULL;
 
 	assert(proto != NULL);
@@ -399,6 +399,9 @@
 	if (from && (f_user = strdup(from))) {
 		if ((f_host = strchr(f_user, '@'))) {
 			*f_host++ = '\0';
+            if ((f_resource = strchr(f_host, '/'))) {
+                *f_resource++ = '\0';
+            }
 		}
 	}
 



More information about the Freeswitch-svn mailing list