mcabber/mcabber/utils.c
changeset 2346 7921c8d671c8
parent 2338 6424627913be
equal deleted inserted replaced
2345:462f4359391c 2346:7921c8d671c8
   140   g_free(a);
   140   g_free(a);
   141   g_free(b);
   141   g_free(b);
   142   return (ret == 0) ? TRUE : FALSE;
   142   return (ret == 0) ? TRUE : FALSE;
   143 }
   143 }
   144 
   144 
       
   145 const char *jid_get_resource_name(const char *fjid)
       
   146 {
       
   147   const char * resource_name = NULL;
       
   148   if (fjid) {
       
   149     resource_name = strchr(fjid, JID_RESOURCE_SEPARATOR);
       
   150     if (resource_name)
       
   151       resource_name++;
       
   152   }
       
   153   return resource_name;
       
   154 }
       
   155 
   145 //  expand_filename(filename)
   156 //  expand_filename(filename)
   146 // Expand "~/" with the $HOME env. variable in a file name.
   157 // Expand "~/" with the $HOME env. variable in a file name.
   147 // The caller must free the string after use.
   158 // The caller must free the string after use.
   148 char *expand_filename(const char *fname)
   159 char *expand_filename(const char *fname)
   149 {
   160 {