validate name better, fix super frustrating bug where connections would inexplicably...
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 16 Dec 2010 05:13:29 +0000 (05:13 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 16 Dec 2010 05:13:29 +0000 (05:13 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@55573 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index 49f1fae..3b9ea1b 100644 (file)
@@ -425,7 +425,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
    Ecore_Con_Server *svr;
    Ecore_Con_Type type;
 
-   if (!name)
+   if ((!name) || (!name[0]))
      return NULL;
    /* local  user   socket: FILE:   ~/.ecore/[name]/[port] */
    /* local  system socket: FILE:   /tmp/.ecore_service|[name]|[port] */
@@ -434,6 +434,10 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
    if (!svr)
      return NULL;
 
+   if (!strncmp(name, "http://", 7))
+     name += 7;
+   else if (!strncmp(name, "https://", 8))
+     name += 8;
    svr->name = strdup(name);
    if (!svr->name)
      goto error;