Index: xmpp_api.internal.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmppframework/contrib/xmpp_api/Attic/xmpp_api.internal.inc,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 xmpp_api.internal.inc
--- xmpp_api.internal.inc	21 Jul 2009 22:16:19 -0000	1.1.2.4
+++ xmpp_api.internal.inc	29 Sep 2009 17:37:51 -0000
@@ -5,15 +5,10 @@
  * Get connection object with this server credentials
  */
 function xmpp_api_get_server_connection($params = array()) {
-  if (!drupal_strlen(XMPP_API_ADMINJID) || !drupal_strlen(XMPP_API_ADMINJID_PASSWORD)) {
-    watchdog('xmpp_api', 'Admin JID or Password is not set for server administration', array(), WATCHDOG_ERROR);
-    return FALSE;
-  }
   // Add default parameters for connection
   $params += array(
     'jid' => XMPP_API_ADMINJID,
     'password' => XMPP_API_ADMINJID_PASSWORD,
-    'server' => XMPP_API_ADMINJID_SERVER,
     'timeout' => 30,
     'persistent' => FALSE,
   );
@@ -34,10 +29,11 @@
 /**
  * Get connection with admin permissions
  *
- * In this case it will be the same as a generic server connection so this is just a wrapper
+ * Same that default server connection with admin server if available
  */
 function _xmpp_api_admin_connection($conn = NULL) {
-  return _xmpp_api_server_connection($conn);
+  $params = XMPP_API_ADMINJID_SERVER ? array('server' => XMPP_API_ADMINJID_SERVER) : array();
+  return $conn ? $conn : xmpp_api_get_server_connection($params);
 }
 
 
