Skip to content

Commit

Permalink
- Remove compiler warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8870 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 8, 2011
1 parent 88e239d commit ff5be76
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mosh/src/mosh.cpp
Expand Up @@ -92,7 +92,6 @@ int main(int argc, char* argv[])
#else
wordexp_t p;
char **w;
int i;
wordexp("~/.mosh_history",&p,0);
if (p.we_wordc == 1) {
w = p.we_wordv;
Expand Down Expand Up @@ -242,7 +241,7 @@ void doSocketCommunication(const string * scriptname)
int port=29500;
char buf[40000];

char* hostname ="localhost";
const char* hostname ="localhost";
// TODO: add port nr. and host as command line option

/* Create the socket. */
Expand Down Expand Up @@ -287,7 +286,15 @@ void doSocketCommunication(const string * scriptname)
if (scriptname) {
const char *str= ("runScript("+*scriptname+")").c_str();
int nbytes = write(sock,str,strlen(str)+1);
if (nbytes == 0) {
cout << "Error writing to server" << endl;
return;
}
int recvbytes = read(sock,buf,40000);
if (recvbytes == 0) {
cout << "Recieved 0 bytes, exiting" << endl;
return;
}
cout << buf << endl;
return;
}
Expand Down

0 comments on commit ff5be76

Please sign in to comment.