Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[oweals/cde.git] / cde / lib / DtSvc / DtEncap / spc-net.c
index dc9cc4071dd4c497ca0c092f6e2294bdf3736219..fafff20b2ead9c25f4606b5ab3cb321c2d62ce7b 100644 (file)
@@ -16,7 +16,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
@@ -172,6 +172,7 @@ Boolean SPC_Init_Local_Host_Info(void)
  */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Local_Hostname(XeString hostname)
 /*----------------------------------------------------------------------+*/
 {
@@ -287,6 +288,7 @@ SPC_Connection_Ptr SPC_Open_Connection(XeString hostname)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Open_Socket(SPC_Connection_Ptr conn,
                int type)
 /*----------------------------------------------------------------------+*/
@@ -319,6 +321,7 @@ SPC_Open_Socket(SPC_Connection_Ptr conn,
 */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Contact_Server(SPC_Connection_Ptr connection)
 /*----------------------------------------------------------------------+*/
 {
@@ -341,8 +344,10 @@ SPC_Contact_Server(SPC_Connection_Ptr connection)
   memcpy(&saddr.sin_addr, remote->h_addr, remote->h_length);
 
   if(connect(connection->sid, (struct sockaddr *)&saddr, sizeof(saddr)) == ERROR) {
-    SPC_Error(SPC_Bad_Connect,
-             XeFindShortHost(remote->h_name));
+    XeString shorthost = XeFindShortHost(remote->h_name);
+    SPC_Error(SPC_Bad_Connect, shorthost);
+    XeFree(shorthost);
+    
     return(SPC_ERROR);
   }
 
@@ -383,12 +388,7 @@ SPC_Connection_Ptr SPC_Init_Child(SPC_Connection_Ptr conn,
 SPC_Connection_Ptr SPC_Standalone_Daemon(SPC_Connection_Ptr conn)
 {
   struct sockaddr_in saddr, client_saddr;
-#ifdef USL
-  /* Only UnixWare 2.02 uses the Spec1170 parameter profile for accept(). */
-  size_t len=sizeof(client_saddr);
-#else
   int len=sizeof(client_saddr);
-#endif
   int server_bind_attempts      = MAX_SERVER_BIND_ATTEMPTS;
   int server_bind_pause         = SERVER_PAUSE_INTERVAL;
   int pid, from;
@@ -481,6 +481,7 @@ SPC_Connection_Ptr SPC_Standalone_Daemon(SPC_Connection_Ptr conn)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Inetd_Daemon(SPC_Connection_Ptr conn)
 /*----------------------------------------------------------------------+*/
 {