~ubuntu-branches/debian/sid/bristol/sid

« back to all changes in this revision

Viewing changes to libbristolmidi/midiTCPDevMan.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2011-02-15 02:54:23 UTC
  • mfrom: (13.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20110215025423-g8hcla5gyl08mae3
Tags: 0.60.8-2
* Upload to unstable.
* Relax JACK's build-deps to let this build in sid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
#ifdef DEBUG
110
110
        printf("bristolMidiTCPActive(%s, %i)\n", host, handle);
111
111
#endif
112
 
printf("bristolMidiTCPActive(%s, %i)\n", host, handle);
113
112
 
114
113
        if ((conntype & BRISTOL_CONN_UNIX) ||
115
114
                ((strncmp("unix", host, 4) == 0)
121
120
 
122
121
        /*
123
122
         * Otherwise try and find a device that is free.
124
 
         */
125
123
        if ((dev = bristolMidiFindDev(NULL)) < 0)
126
124
                return(dev);
 
125
         */
127
126
 
128
127
        bmidi.dev[dev].flags |= BRISTOL_CONN_TCP;
129
128
 
139
138
                }
140
139
                bmidi.dev[dev].flags = BRISTOL_CONN_TCP;
141
140
        } else {
142
 
printf("PASSIVE\n");
143
141
                /*
144
142
                 * We need to open a control socket to the bristol engine. For the time
145
143
                 * being we will only be concerned with a unix domain socket.
170
168
                bmidi.dev[dev].flags = BRISTOL_CONN_TCP;
171
169
        }
172
170
 
173
 
        printf("Connected to the bristol control socket: %i\n", bmidi.dev[dev].fd);
 
171
        printf("Connected to the bristol control socket: %i (dev=%i)\n",
 
172
                bmidi.dev[dev].fd, dev);
174
173
 
175
174
        blinger.l_onoff = 1;
176
175
        blinger.l_linger = 2;
183
182
}
184
183
 
185
184
/*
186
 
 * select for data on every TCP connection
 
185
 * select for data on every TCP connection. Hm, this is problematic for the
 
186
 * monolithic process as it owns all the sockets.
187
187
 */
188
188
int
189
189
bristolMidiTCPRead(bristolMidiMsg *msg)