diff options
author | Rahul P | 2019-12-30 12:39:33 +0530 |
---|---|---|
committer | GitHub | 2019-12-30 12:39:33 +0530 |
commit | 83eaefa28d5eea84f00276397445b707680293d5 (patch) | |
tree | de3a089a43d296902d09fb4a5382340ad457dbdc /src/ghdlserver | |
parent | 9faa3ee18b0fe7ec50399b06280a5247658c3e9c (diff) | |
parent | 9f4a01266df727287bab34ed40e039f5f13aa3ee (diff) | |
download | nghdl-83eaefa28d5eea84f00276397445b707680293d5.tar.gz nghdl-83eaefa28d5eea84f00276397445b707680293d5.tar.bz2 nghdl-83eaefa28d5eea84f00276397445b707680293d5.zip |
Merge pull request #36 from rahulp13/master
handle apt errors, qt error-channel for make errors
Diffstat (limited to 'src/ghdlserver')
-rw-r--r-- | src/ghdlserver/ghdlserver.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ghdlserver/ghdlserver.c b/src/ghdlserver/ghdlserver.c index e05a156..60e1a20 100644 --- a/src/ghdlserver/ghdlserver.c +++ b/src/ghdlserver/ghdlserver.c @@ -100,7 +100,7 @@ static int get_ngspice_pid(void) if ((dirp = opendir("/proc/")) == NULL) { - perror("opendir /proc failed"); + perror("get_ngspice_pid() - opendir /proc failed "); exit(-1); } @@ -112,7 +112,7 @@ static int get_ngspice_pid(void) int tmp = strtol(dir_entry->d_name, &nptr, 10); if ((errno == ERANGE) && (tmp == LONG_MAX || tmp == LONG_MIN)) { - perror("strtol"); // Number out of range. + perror("get_ngspice_pid() - strtol"); // Number out of range. return(-1); } if (dir_entry->d_name == nptr) @@ -133,7 +133,7 @@ static int get_ngspice_pid(void) } } - if (fp) fclose(fp); + if (fp) fclose(fp); return(pid); } @@ -165,7 +165,7 @@ static void create_pid_file(int sock_port) fprintf(pid_file,"%d\n", my_pid); fclose(pid_file); } else { - perror("fopen() - PID file"); + perror("create_pid_file() - cannot open PID file "); syslog(LOG_ERR, "create_pid_file(): Unable to open PID file in /tmp"); exit(1); } @@ -323,7 +323,7 @@ static void receive_string(int sock_id, char* buffer) nbytes = recv(sock_id, buffer, MAX_BUF_SIZE, 0); if (nbytes <= 0) { - perror("READ FAILURE"); + perror("receive_string() - READ FAILURE "); exit(1); } } @@ -394,13 +394,13 @@ void Vhpi_Initialize(int sock_port, char sock_ip[]) if(server_socket_id >= 0) { - syslog(LOG_INFO,"Started the server on port %d SRV:%d", - DEFAULT_SERVER_PORT, server_socket_id); + syslog(LOG_INFO,"Started the server on port %d SRV:%d", + DEFAULT_SERVER_PORT, server_socket_id); break; } syslog(LOG_ERR,"Could not start server on port %d,will try again", - DEFAULT_SERVER_PORT); + DEFAULT_SERVER_PORT); usleep(1000); try_limit--; @@ -408,7 +408,7 @@ void Vhpi_Initialize(int sock_port, char sock_ip[]) { syslog(LOG_ERR, "Error:Tried to start server on port %d, failed..giving up.", - DEFAULT_SERVER_PORT); + DEFAULT_SERVER_PORT); exit(1); } } |