]> git.lyx.org Git - lyx.git/blobdiff - src/lyxserver.C
Angus insetindex patch + protect patch from Dekel
[lyx.git] / src / lyxserver.C
index 2221ddd941fbf8ea3f261e4b5db202a69ed84d79..d0ad5c7ce2e9734c4a0349da9492f97bcc6b94a3 100644 (file)
@@ -120,7 +120,7 @@ void LyXComm::openConnection() {
                lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
                       << "If no other LyX program is active, please delete"
                        " the pipe by hand and try again." << endl;
-               pipename.clear();
+               pipename.erase();
                return;
        }
 #ifndef __EMX__
@@ -171,7 +171,7 @@ void LyXComm::openConnection() {
                lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
                       << "If no other LyX program is active, please delete"
                        " the pipe by hand and try again." << endl;
-               pipename.clear();
+               pipename.erase();
                return;
        }
 #ifndef __EMX__
@@ -343,7 +343,7 @@ void LyXComm::callback(int fd, void *v)
                        {
                                lyxerr << "LyxComm: truncated command: " 
                                       << lsbuf << endl;
-                               lsbuf.clear();
+                               lsbuf.erase();
                        }
                        break; // reset connection
                }
@@ -430,6 +430,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
        bool server_only = false;
        while(*p) {
                // --- 1. check 'header' ---
+
                if (strncmp(p, "LYXSRV:", 7) == 0) {
                        server_only = true; 
                } else if(0!= strncmp(p, "LYXCMD:", 7)) {
@@ -497,7 +498,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
                                }
                                if (i < serv->numclients) {
                                        serv->numclients--;
-                                       serv->clients[i].clear();
+                                       serv->clients[i].erase();
                                        lyxerr[Debug::LYXSERVER]
                                                << "LyXServer: Client "
                                                << client << " said goodbye"
@@ -527,7 +528,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
                        string rval, buf;
                    
                        if (action>= 0) {
-                               rval = serv->func->Dispatch(cmd);
+                               rval = serv->func->Dispatch(action, arg.c_str());
                        } else {
                                rval = "Unknown command";
                        }