All the new audio stuff.
[jog] / tx-socket.c
index 8fcf968..394b8b6 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: tx-socket.c,v 1.1 2002/01/25 19:34:45 mdw Exp $
+ * $Id: tx-socket.c,v 1.2 2002/01/30 09:25:35 mdw Exp $
  *
  * Socket transport
  *
@@ -29,6 +29,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: tx-socket.c,v $
+ * Revision 1.2  2002/01/30 09:25:35  mdw
+ * Minor modifications for the transport configuration change.
+ *
  * Revision 1.1  2002/01/25 19:34:45  mdw
  * Initial revision
  *
@@ -74,28 +77,19 @@ typedef struct txsock {
 /* --- @txsock_create@ --- *
  *
  * Arguments:  @const char *file@ = filename for socket
- *             @const char *config@ = configuration string
  *
  * Returns:    Pointer to created transport block.
  *
  * Use:                Creates a socket transport.
  */
 
-txport *txsock_create(const char *file, const char *config)
+txport *txsock_create(const char *file)
 {
   txsock *tx;
   int fd;
   struct sockaddr_un *sun;
   size_t len, sunsz;
 
-  /* --- Parse the configuration --- */
-
-  if (config && *config) {
-    err_report(ERR_TXPORT, ERRTX_CONFIG, 0,
-              "bad configuration for socket transport");
-    goto fail_0;
-  }
-
   /* --- Set up the address block --- */
 
   len = strlen(file) + 1;
@@ -109,7 +103,7 @@ txport *txsock_create(const char *file, const char *config)
   if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
     err_report(ERR_TXPORT, ERRTX_CREATE, errno,
               "error creating socket: %s", strerror(errno));
-    goto fail_1;
+    goto fail_0;
   }
 
   /* --- Connect --- */
@@ -117,7 +111,7 @@ txport *txsock_create(const char *file, const char *config)
   if (connect(fd, (struct sockaddr *)sun, sunsz)) {
     err_report(ERR_TXPORT, ERRTX_CREATE, errno,
               "couldn't connect to `%s': %s", file, strerror(errno));
-    goto fail_2;
+    goto fail_1;
   }
 
   /* --- Done --- */
@@ -129,11 +123,10 @@ txport *txsock_create(const char *file, const char *config)
 
   /* --- Tidy up because it all went horribly wrong --- */
 
-fail_2:
-  close(fd);
 fail_1:
-  xfree(sun);
+  close(fd);
 fail_0:
+  xfree(sun);
   return (0);
 }